willpower101 Posted June 20, 2015 Share Posted June 20, 2015 (edited) Link to the thread i'm working with including a config.plist and questions answered. Edited June 25, 2015 by Allan Link for Tonymac deleted. Link to comment Share on other sites More sharing options...
Micky1979 Posted August 13, 2015 Share Posted August 13, 2015 (edited) About 17char MLB's 17 char MLB is a bit harder to decipher. I have found this pattern after examination of approx. 10 MLB's. I suspect that Apple is using a new system for year and week identification for 17 char MLB. I guess that YW pattern occurs in 17char MLBs, but location is shifted and there is only one char used for week. PPPYWXXXXXXCCCCCC I don't have enough data to decipher the 17char MLB pattern yet. You are welcome to help. Found Y and W calculation...(if not later) Already said Like for serial number at certain point from 11 lenght that became 12 digits lenght due to the PP part that have became PPP (but also for the CCC+ part) the same for the MLB. This example regard a real serial number, so not MLB, but I'm pretty sure the logic is the same (like they are using certified standard ISO 9000 in UE for quality reason, and suppliers must comply). this is a valid Sn: C02HM***DTY3, masked here, put into Apple Service Center online: Nice Name: MacBook Pro 13 inch Unibody Core i5 (Mid 2012) Machine Model: MacBookPro9,2 Please visit our facebook page Family name: A1278 Model Number: MD101 Group1: MacBook Group2: Pro Generation: CPU speed: 2.5GHz Screen size: 13 inch Screen resolution: 1280x800 pixels Colour: Aluminium Production week : -18- (May) Production year : -2012- Model introduced: -2012- Memory - flavour: DDR3-S-1600 Memory - number of slots: 2 Memory - maximum total: 16GB Memory - largest module: 8GB Factory: C0 (Quanta Computer (Susidiary = Tech Com) China) PPP Y W SSS CCCC C02 H M *** DTY3 let's go: Y calculated like 0 stand for 2010 (or also 2000, 2020...but DTY3 ensure is 2010+), letter to choose depend by the week (see "W") . 0 1 2 3 4 5 6 7 8 9 (last number of a year example 2012) CD FG HJ KL MN PQ RS TV WX YZ (for each year, two letters, the first in case of Mid, the second for Late) then year is 2012, under 2 you can find HJ. because H and not J? see W table below. W a year can have 52 + 1 weeks (year depending), so max 26 for MId and 27 for Late. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 2 3 4 5 6 7 8 9 C D F G H J K L M N P Q R T V W X Y then week is 18 so choose M of (Mid 2012 because of Y table say that under 2 that stand for 2012, H is the Mid of the year) For example, today we are i august 13 (33° week), YW will be Q6 because we are in week 6 of Late 2015. Simply because 33 is out of 27 weeks in our W table, and we are now in the Late of the year, and the new week is the sixth of the second half-year. PPP C0 mean China, 2 is the establishment nr 2 in china (the production is increased like also the places), so is a number always?NO can be a letter too. CCCC no fancy, regard a specific model, equal for identical model: DTY3 = particular CPU, video card etc, and sure is a MacBook Pro 13 unibody SSS a progressive number? rest this to find a table. Ok there's a X in the middle (*X*), is not a number like max 999 MacBook Pro in a week, the number would be too low for 53 week of production. How many mac Apple produce in a year? It is related to the year or a week? naaah! maybe in part but quantity is important for sales invoice, but not for a serial number. ISO spec, but also ANSI require traceability, ie when you know where and when, you need to know who! ..basically conducible to a machinery and operator! ..it is a possibility Suggestions...is right? ....just test with real Mac.. EDIT serial and MLB are related on how are built for location, year an week. location can be the same of the serial, but also not, the one on post #532 match, probably the motherboard is assembled in the same factory where the final Mac comes out, nothing strange. Edited August 14, 2015 by Micky1979 something already said 2 Link to comment Share on other sites More sharing options...
Micky1979 Posted August 13, 2015 Share Posted August 13, 2015 (edited) Got also a real MLB: MLB.: W80****JRFUPA printed on the Main Logic Board. **** part It seems a year, in clear (and nothing to do with the serial in my previous post). near it also: Serial No.:W80****P8AGW Well, PPP part belong to a known location like in the serial, if not just a case...this proof that you can use anyway the location from the Serial for your MLB; this is demostrated also by Clover. EDIT II Another MacBook Pro Mid 2012, now PPP this time is a different location. and also: EMC No.:2353 EDIT II this is a pict: MLB year does not match Serial year, but is normal. Anyway I suppose that in 2015 there is little difference in time between LB and final Mac dates of manufactoring ... EDIT III Ok, on 17 chars MLB XXXXXX appear to be numeric only (from what I saw) Edited August 14, 2015 by Micky1979 Already said Link to comment Share on other sites More sharing options...
moemedimrtn Posted August 14, 2015 Share Posted August 14, 2015 I have a working PC in terms of iMessages, at least with my old iPhone login and log out. However when i use the recent bought another iphone for my wife, with different iCloud account, it says I need to contact Apple. I am worried not knowing what they will require from me relating to my Hackintosh. Can u tell what should i have in hand before i call? Or do I need a real Mac Pro, in order to Activate iMessages for the first time? I have tried turning iMessages setting On/Off but I can't be certain that her iCloud user account is Activated for iMessages. How can I bypass this without a hassle? MLB 13 Characters. I don't own a real Mac. Link to comment Share on other sites More sharing options...
Micky1979 Posted August 14, 2015 Share Posted August 14, 2015 Well, what can I say, no one will give you a real MLB with the risk that a real Mac comes banned. An iPhone I suspect use its IMEI, its serial so I see no relationship with you Hack, but me, I have a Galaxy S5 so I can't help you Link to comment Share on other sites More sharing options...
Micky1979 Posted August 14, 2015 Share Posted August 14, 2015 Ok, my previous posts was a lose of time, because nothing new for you, but somthing new for me (I'm writing somthing for Pandora. Now my ideas are a little more clear).Looking at http://download.info.apple.com/Apple_Hardware_Test/022-5879-A.dmg, is the Apple test Hardware for MacBookPro9,2, but there's a lot of it for different and specific models. Locating MLB.efi, I have found something in the binary: a checksum for the MLB! Could not locate the SmcIo ProtocolCould not Get PciIo for Northbridge Northbridge: S%d:B%d:D%d:F%d Could not Get PciIo for Southbridge Southbridge PCI: S%d:B%d:D%d:F%d mlb-serial-numberMLB Serial number has incorrect length s/b 17, was: %dMLB Serial number FAILED checksumtstc fct test count returned status 0x%x, checking using old method tstptsth PD_GetData fct test passes variable returned error 0x%x tsty PD_GetData FCTTestType returned error 0x%x test count = %d, test history = 0x%llx Test Type: %02d: = 0x%02x%02x %02x%02x %02x%02x %02x%02x As you can see it check the lenght for 17 chars (we know), but the checksum?? then: MLBVerify ICT Was Run And PassedVerify ICT was run and last iteration passed.(class="MLB")Verify FCT Was Run And PassedVerify FCT was run and last iteration passed.Check POST ResultsCheck POST results from last reboot.Set Enhanced POST At Next RebootSet enhanced Power-On Self Test to run at next reboot.Verify MLB Serial Number ChecksumVerify the MLB Serial Number Checksum is correctVerify EST Bit Set TestVerify The Extended Service Test Bit is set.Verify Field EST Bit Set TestVerify The Extended Service Test Bit and MLB Replaced Bits are set.Verify EST Bit Cleared TestVerify the Extended Service Test Bit has been cleared.Verify MLBR Bit Cleared TestVerify the MLB Replaced Bit has been cleared.MLB boot ROM main checksum failedICT Flags not set, ICT was never run on this MLBFCT Flags not set, FCT did not runPOST Test 1 failedPOST Test 2 failedPOST Test 3 failedPOST Test 4 failedPOST Extended Test failedICT ran, but it failed on its last runFCT ran, but it failed on its last previous runMLB Serial Number checksum failedMLB Serial Number returned a bad lengthFCT invalid data values found in diagnostic areaPOST results valid signature not foundMagic number not found in 128 byte ICT data areaMLB FCT write failed to completeMLB POST results indicate POST did not complete on last runMLB POST results indicate POST did not complete on a previous runMLB EST Bit not setMLB Field EST Test FailedEST Bit Cleared Test FailedMLBR Bit Cleared Test FailedMLBclassinternallocation?mlb-serial-numbermlb-serial-number1mlb-serial-number2mlb-serial-number3mlb-serial-number4mac-address%02x:%02x:%02x:%02x:%02x:%02xbios-versionrom-version%x.%x%x%xsmc-version%dbus-frequencycpus-installed0x%xnorthbridge-device-idnorthbridge-revisionsouthbridge-device-idsouthbridge-revisionClearPOSTTestResultsMLB_SetFCTMLB_SetFCTPassFailMLB_SetESTMLB_SetMLBReplacedMLB_GetRTCRamSizeMLB_GetRTCRamData? this part is really intresting: mlb-serial-numbermlb-serial-number1mlb-serial-number2mlb-serial-number3mlb-serial-number4mac-address%02x:%02x:%02x:%02x:%02x:%02xbios-versionrom-version%x.%x%x%xsmc-version%dbus-frequencycpus-installed0x%xnorthbridge-device-idnorthbridge-revisionsouthbridge-device-idsouthbridge-revisionClearPOSTTestResultsMLB_SetFCTMLB_SetFCTPassFailMLB_SetESTMLB_SetMLBReplacedMLB_GetRTCRamSizeMLB_GetRTCRamData? To me seem "how a MLB is composed by" in a official way... any help? What matter Northbridge-Southbridge revision, smc version and bios version rom etc? Nothing new the mac address is there: 0) numbermlb = bios-versionrom (2 char?) 1) number1mlb = smc-version (3 char?) 2) number2mlb = bus-frequencycpus-installed (2 char) 3) number3mlb = northbridge-device-id+revisionsouthbridge-device-id (4char?) 4) number4mac = mac address (6 char, only one part?) total 17 chars (sure). Sequence must be ascertain, but %02x and %x print hex format in *upper case form... Also you can find there: 0123456789ABCDEFGHJKLMNPQRSTUVWXYZ (I and O are missing, so this is a *base34 table) Is that to caclulate the checksum????????? What a laugh, MLB is an entire base34 string? 3 Link to comment Share on other sites More sharing options...
mhaeuser Posted August 14, 2015 Share Posted August 14, 2015 That module is pretty huge. With 97 subs and a few dozen stack vars in a few of them, I'm not sure if really the entire module is entirely for MLB... Link to comment Share on other sites More sharing options...
Micky1979 Posted August 14, 2015 Share Posted August 14, 2015 I don't own a real Mac and only yesterday I could see some being repaired, but the hardware test I suppose can be run on a real Mac.... so someone can see what's going on directly on the monitor.. "test-ongoing-mlb-status" = "Testing main logic board."; as write in the localizable.string maybe it show what we need. Once installed the module is activated by holding on "d" at startup. What can be the flags for our bootloaders? ...errors surely show up Link to comment Share on other sites More sharing options...
mhaeuser Posted August 14, 2015 Share Posted August 14, 2015 I'm quite certain MLB cannot be 'generated'. From what has been researched before parts depend on where and when the board was made and that ofc always is either fake or taken from a Mac. I think the function just verifies the structure of the MLB (length, used characters, ...) 1 Link to comment Share on other sites More sharing options...
Micky1979 Posted August 14, 2015 Share Posted August 14, 2015 That tool have a GUY, btw /* Copyright © 2001-2012 Apple Inc. All Rights Reserved. *//* Localization dictionary for Apple Hardware Test 3.0 series */"is-two-bytes" = "0";"version-sig" = "EN-070918";"common-controls-restart" = "Restart";"common-controls-shutdown" = "Shut Down";"common-controls-continue" = "Continue";"common-tab-apple-title" = " About "; // does look better with spaces at head and tail"common-tab-test-title" = " Hardware Tests "; // does look better with spaces at head and tail"common-tab-profile-title" = " Hardware Profile "; // does look better with spaces at head and tail"common-version-str" = "Version ";"common-bundle-str" = "Bundle ";"mark-graphics-unknown-str" = "Unknown video";"mark-graphics-none-str" = " ";"mark-generic-present-str" = "Installed";"mark-generic-absent-str" = "Not Found";"mark-generic-hasDevice-str" = "Device connected";"mark-generic-hasNoDevice-str" = "No device connected";"units-hz--short-str" = "Hz";"units-hz--long-str" = "Hertz";"units-byte-short-str" = "B";"units-byte-long-str" = "Byte";"units-bit-short-str" = "b";"units-bit-long-str" = "bit";"units-volt-short-str" = "V";"units-volt-long-str" = "Volt";"units-hour-str" = " hour ";"units-hours-str" = " hours ";"units-min-str" = " min ";"units-mins-str" = " mins ";"units-sec-str" = " sec";"units-secs-str" = " secs";"units-kilo-str" = "K";"units-mega-str" = "M";"units-giga-str" = "G";"units-tera-str" = "T";"delim-date-str" = "/";"delim-at-str" = " @ ";"delim-record-str" = ":";"delim-field-str" = ", ";"delim-item-str" = "-";"delim-decimal-str" = ".";"delim-thousds-str" = ", ";"delim-space-str" = " ";"delim-pct-str" = "%";"notcompat-nosupport-str" = "Apple Hardware Test does not support this machine.";"notcompat-ownrisk-str" = "Continue at your own risk [pre-release only].";"test-head-intro1-text" = "Apple Hardware Test can perform hardware testing of your Macintosh.";"test-head-intro2-text" = "To perform the tests, click on the “Test” button or press the “T” key.";"test-probe-onto-text" = "Probing your hardware; this may take a minute...";"test-probe-outof-text" = "Hardware probe complete.";"test-controls-launch" = "Test";"test-controls-interrupt" = "Stop Testing";"test-choices-title" = "Test Choices";"test-about-title" = "About the Tests and Results";"test-results-title" = "Test Results";"test-results-notestyet" = "No test can be run until probe is completed.";"test-results-nodevfound" = "No devices were found.";"test-results-notyet" = "Ready for testing.";"test-results-quick-ongoing" = "Testing in progress.";"test-results-extend-ongoing" = "Extended testing in progress.";"test-results-willstop" = "Testing will stop.";"test-results-interrupted" = "Testing was not completed.";"test-results-nofail" = "No trouble found.";"test-results-error" = "Internal error during test.";"test-results-failed" = "Alert! Apple Hardware Test has detected an error.";"test-ongoing-short-status" = "Testing in progress.";"test-ongoing-mlb-status" = "Testing main logic board.";"test-ongoing-memory-status" = "Testing memory.";"test-ongoing-storage-status" = "Testing storage.";"test-ongoing-video-status" = "Testing graphics.";"test-ongoing-pass-time-text" = " into testing...";"test-ongoing-pass-time-1-text" = " ";"test-ongoing-pass-time-2-text" = "into testing...";"test-ongoing-sess-pass-text" = "Pass Number: ";"test-ongoing-sess-time-text" = "Total Time Testing: ";"test-desc-initial-1-text" = "Apple Hardware Test is a diagnostic tool for detecting problems with your computer's hardware components.";"test-desc-initial-2-text" = " ";"test-desc-initial-3-text" = "The tests performed will help determine if you have a hardware problem or a software problem.";"test-desc-initial-4-text" = " ";"test-desc-initial-5-text" = "If the test results determine that a hardware problem does not exist, consult the manual and/or Help (system) that came with your computer for further troubleshooting.";"test-desc-initial-6-text" = " ";"test-desc-intro-quick-text" = "Estimated time to complete: 3 minutes or longer, depending on the amount of memory installed."; /* default */"test-desc-intro-quick-text2" = "Estimated time to complete: 10 to 15 seconds or longer, depending on the amount of memory installed.";"test-desc-intro-quick-text3" = "Estimated time to complete: 2 minutes or longer, depending on the amount of memory installed.";"test-desc-intro-quick-text4" = "Estimated time to complete: 4 minutes or longer, depending on the amount of memory installed.";"test-desc-intro-extend-text" = "Estimated time to complete: 1 hour or longer, depending on the amount of memory installed."; /* default */"test-desc-intro-extend-text2" = "Estimated time to complete: 10 to 15 minutes or longer, depending on the amount of memory installed.";"test-desc-intro-extend-text3" = "Estimated time to complete: 30 minutes or longer depending, on the amount of memory installed.";"test-desc-intro-extend-text4" = "Estimated time to complete: 2 hours or longer, depending on the amount of memory installed.";"test-desc-option-extend-text" = "Perform extended testing (takes considerably more time).";"test-desc-option-loop-text" = "Looping enabled.";"test-desc-quick-running-1-text" = "Testing in progress...";"test-desc-quick-running-2-text" = "To stop, click the “Stop Testing” button.";"test-desc-quick-running-3-text" = "Or, press the “command” (“Apple”) key and the “.” (period) key at the same time.";"test-desc-quick-running-4-text" = " ";"test-desc-extend-running-1-text" = "Extended Testing in progress...";"test-desc-extend-running-2-text" = "To stop, click the “Stop Testing” button.";"test-desc-extend-running-3-text" = "Or, press the “command” (“Apple”) key and the “.” (period) key at the same time.";"test-desc-extend-running-4-text" = " ";/* About the Tests and Results Test tests failed */"test-result-testing-1-text" = "Alert! Apple Hardware Test has detected an error.";"test-result-testing-2-text" = " ";"test-result-testing-3-text" = "First, make a note of the Error Code in the Test Results area.";"test-result-testing-4-text" = " ";"test-result-testing-5-text" = "Second, if there are any peripherals attached to the computer, please shut down the computer, disconnect the peripherals and run the Extended Test to verify the results.";"test-result-testing-6-text" = " ";"test-result-testing-7-text" = "Next, if an error is still reported, review the service and support material that accompanied your computer for instructions on contacting AppleCare for further assistance.";"test-result-testing-8-text" = " ";/* About the Tests and Results Test POST failed */"test-result-startup-1-text" = "Alert! Apple Hardware Test has detected an error at startup.";"test-result-startup-2-text" = " ";"test-result-startup-3-text" = "First, make a note of the Error Codes in the Test Results area.";"test-result-startup-4-text" = " ";"test-result-startup-5-text" = "Second, if there are any peripherals attached to the computer, please shut down the computer, disconnect the peripherals and run the Extended Test to verify the results.";"test-result-startup-6-text" = " ";"test-result-startup-7-text" = "Next, if an error is still reported, review the service and support material that accompanied your computer for instructions on contacting AppleCare for further assistance.";"test-result-startup-8-text" = " ";"test-result-startup-9-text" = " ";"test-result-startup-10-text" = " ";"test-result-startup-11-text" = " ";/* HW-Profile values */"prof-prod-group-title" = "Product";"prof-prod-group-subtitle" = "Product details:";"prof-prod-name-label" = "Macintosh name:";"prof-prod-model-label" = "Macintosh model:";"prof-prod-cputype-label" = "CPU Type:";"prof-prod-cpucount-label" = "Number Of Processors:";"prof-prod-cpucoretotal-label" = "Total Number Of Cores:";"prof-prod-cpucorecount-label" = "Number Of Cores:";"prof-prod-cpuspeed-label" = "CPU Speed:";"prof-prod-cpucache-label" = "L2 CPU Cache (per processor):";"prof-prod-L2cache-label" = "L2 Cache:";"prof-prod-L2cachecore-label" = "L2 Cache (per core):";"prof-prod-L3cache-label" = "L3 Cache:";"prof-prod-cpucache3-label" = "L3 CPU Cache (per CPU):";"prof-prod-mlb-sn-label" = "MLB serial#:";"prof-processor-tray-sn-label" = "Processor Tray serial#:";"prof-graph-group-title" = "Video";"prof-graph-group-subtitle" = "Video details:";"prof-graph-chipset-label" = "Graphics:";"prof-graph-vram-label" = "VRAM:";"prof-graph-disp-width-label" = "Display width (pixels):";"prof-graph-disp-height-label" = "Display height (pixels):";"prof-communi-group-title" = "Communication";"prof-communi-group-subtitle" = "Communication details:";"prof-communi-enet-mac-label" = "Ethernet MAC address:";"prof-communi-fwire-mac-label" = "FireWire MAC address:";"prof-communi-airp-type-label" = "AirPort:";"prof-communi-bluetooth-label" = "Bluetooth:";"prof-communi-irport-label" = "IR Receiver:";"prof-communi-usb1-connect-label" = "USB Port 1:";"prof-communi-usb2-connect-label" = "USB Port 2:";"prof-communi-usb3-connect-label" = "USB Port 3:";"prof-communi-usb4-connect-label" = "USB Port 4:";"prof-memo-group-title" = "Memory";"prof-memo-group-subtitle" = "Memory details:";"prof-memo-overview-label" = "Overview";"prof-memo-slot-1-label" = "Memory #1";"prof-memo-slot-2-label" = "Memory #2";"prof-memo-slot-3-label" = "Memory #3";"prof-memo-slot-4-label" = "Memory #4";"prof-memo-slot-5-label" = "Memory #5";"prof-memo-slot-6-label" = "Memory #6";"prof-memo-slot-7-label" = "Memory #7";"prof-memo-slot-8-label" = "Memory #8";"prof-memo-type-str" = "MLB soldered SDRAM.";"prof-memo--str" = "Unknown";"prof-memo-pc2-3700-str" = "PC2-3700";"prof-memo-pc2-4000-str" = "PC2-4000";"prof-memo-pc2-4200-str" = "PC2-4200";"prof-memo-pc2-4800-str" = "PC2-4800";"prof-memo-ddr2-str" = "DDR2 SDRAM";"prof-memo-fbdimm-str" = "FBDIMM";"prof-memo-cl-str" = "CL";"prof-memo-ct1-str" = " Cycle time (ns)";"prof-memo-ct2-str" = " Cycle (ns)";"prof-memo-ct3-str" = " (ns)";"prof-memo-rev-str" = "Rev.";"prof-memo-paired-str" = "Paired with #";"prof-memo-paired-not-str" = " not paired";"prof-memo-mismatch-label" = "Mismatch:";"prof-memo-size-str" = " size";"prof-memo-speed-str" = " speed";"prof-memo-vendor-str" = " vendor";"prof-memo-recommend-str" = "Recommended: ";"prof-memo-post-fail-str" = "POST failure";"prof-board-group-title" = "Logic Board";"prof-board-brom-vers-label" = "Boot ROM version:";"prof-board-smc-vers-label" = "SMC version:";"prof-board-syst-sn-label" = "System serial #:";"prof-board-bootdev-label" = "Default boot device:";"prof-stor-group-title" = "Storage";"prof-stor-size-label" = "Size:";"prof-powr-group-title" = "Power";"prof-powr-group-subtitle" = "Power details:";"prof-powr-src-label" = "Power source:";"prof-powr-src-wall-str" = "Adapter";"prof-powr-src-batt-str" = "Battery";"prof-powr-ac-on-str" = "Connected";"prof-powr-ac-off-str" = "Not connected";"prof-powr-capac-label" = "Capacity:";"prof-powr-volt-label" = "Voltage:";"prof-powr-status-label" = "Status:"; "test-result-testing-1-text" = "Alert! Apple Hardware Test has detected an error."; "test-result-testing-2-text" = " "; "test-result-startup-3-text" = "First, make a note of the Error Codes in the Test Results area."; "prof-prod-mlb-sn-label" = "MLB serial#:"; What say, this tool surely show how a real MLB is compose! my 2 cents This is a video on youtube: Thest passed, so no errors... Link to comment Share on other sites More sharing options...
Micky1979 Posted August 15, 2015 Share Posted August 15, 2015 From what has been researched before parts depend on where and when the board was made and that ofc always is either fake or taken from a Mac. I think the function just verifies the structure of the MLB (length, used characters, ...) Yes, it can be, just dreaming, but why check only the lenght testing the motherboard?? no sense to me. "mlb-serial-numbermlb-serial-number1mlb-serial-number2mlb-serial-number3mlb-serial-number4mac-address", mmmh deserves decoding w AIDA or something else.. Link to comment Share on other sites More sharing options...
Hanger1(H1) Posted August 15, 2015 Share Posted August 15, 2015 @Micky1979 awesome info. thanks It should look like this: MLB Verify ICT Was Run And Passed Verify ICT was run and last iteration passed. (class="MLB") Verify FCT Was Run And Passed Verify FCT was run and last iteration passed. Check POST ResultsCheck POST results from last reboot. Set Enhanced POST At Next Reboot Set enhanced Power-On Self Test to run at next reboot. Verify MLB Serial Number Checksum Verify the MLB Serial Number Checksum is correct Verify EST Bit Set Test Verify The Extended Service Test Bit is set. Verify Field EST Bit Set Test Verify The Extended Service Test Bit and MLB Replaced Bits are set. Verify EST Bit Cleared Test Verify the Extended Service Test Bit has been cleared. Verify MLBR Bit Cleared Test Verify the MLB Replaced Bit has been cleared. MLB boot ROM main checksum failed ICT Flags not set, ICT was never run on this MLBFCT Flags not set, FCT did not run POST Test 1 failed POST Test 2 failed POST Test 3 failed POST Test 4 failed POST Extended Test failed ICT ran, but it failed on its last run FCT ran, but it failed on its last previous run MLB Serial Number checksum failed MLB Serial Number returned a bad length FCT invalid data values found in diagnostic area POST results valid signature not found Magic number not found in 128 byte ICT data area MLB FCT write failed to complete MLB POST results indicate POST did not complete on last run MLB POST results indicate POST did not complete on a previous run MLB EST Bit not set MLB Field EST Test Failed EST Bit Cleared Test Failed MLBR Bit Cleared Test Failed MLBclassinternallocation? # ---------As i think its every character of "13 Char MLB"------- 01: mlb-serial-number (From Mac Serial Number) 02: mlb-serial-number1 (From Mac Serial Number) 03: mlb-serial-number2 (From Mac Serial Number) 04: mlb-serial-number3 (From Mac Serial Number) 05: mlb-serial-number4 (From Mac Serial Number) 06: mac-address%02x:%02x:%02x:%02x:%02x:%02x 07: bios-version 08: rom-version%x.%x%x%x 09: smc-version%d 10: bus-frequency 11: cpus-installed0x%x 12: northbridge-device-id 13: northbridge-revision ( OR ) 12: southbridge-device-id 13: southbridge-revision ------------------------------------- Clear POST Test Results MLB_SetFCT MLB_SetFCTPassFail MLB_SetEST MLB_SetMLBReplaced MLB_GetRTCRamSize MLB_GetRTCRamData? (Post EDITED) 2 Link to comment Share on other sites More sharing options...
Micky1979 Posted August 15, 2015 Share Posted August 15, 2015 THX, anyway no proof atm. Link to comment Share on other sites More sharing options...
Hanger1(H1) Posted August 15, 2015 Share Posted August 15, 2015 @Micky1979 Is your mac has 13 Char MLB ? Link to comment Share on other sites More sharing options...
Micky1979 Posted August 15, 2015 Share Posted August 15, 2015 (edited) The link to the dmg I posted refer to a MacBookPro9,2 so it should be 17 chars. By the way I use that in my Hackintosh (no real Mac here, and not today). About "01:" to "05:" the logic board should not use chars from the one on the chassis, as already said in this topic born before it. A long number.. but not in hex...in binary, ok processed as hex, then converted back to base34, just to think to make places for all <_>I was think that mlb-serial-number0-5 is for everything, but w/o IDA is difficult to say, its pseudo code should be enought. I have Hopper but is not good with this binary . Edited August 15, 2015 by Micky1979 1 Link to comment Share on other sites More sharing options...
Micky1979 Posted August 23, 2015 Share Posted August 23, 2015 If anyone wants take a look: /* This file has been generated by the Hex-Rays decompiler. Copyright (c) 2007-2014 Hex-Rays <info@hex-rays.com> Detected compiler: Unknown */ #include <defs.h> //------------------------------------------------------------------------- // Function declarations int __cdecl sub_1641(int a1, int a2); int __cdecl sub_1849(int a1, int a2); signed int __cdecl sub_1BAC(int a1); signed int sub_23C4(); signed int sub_2D22(); int __cdecl sub_2F3A(int a1); int __cdecl sub_30A3(int a1); int __cdecl sub_31EB(int a1); int __cdecl sub_3392(int a1, int a2, int a3, unsigned int a4); int __cdecl sub_3E75(int a1); bool __cdecl sub_412E(int a1); signed int __cdecl sub_48DC(int a1); int __cdecl sub_4E73(int a1, int a2); int __cdecl sub_4EA0(int a1); int __cdecl sub_4EC6(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8); int __cdecl sub_4F1D(int a1, int a2); int __cdecl sub_4F4A(int a1, int a2); int __cdecl sub_4F77(int a1); int __cdecl sub_4F9D(int a1, int a2, int a3, int a4, __int16 a5, int a6, __int16 a7); int __cdecl sub_4FF8(int a1); int __cdecl sub_51CE(int a1, int a2, int a3, int a4); int __cdecl sub_54CB(int a1, int a2); int sub_59A8(); // weak int sub_5F32(); // weak int __cdecl sub_5FAF(int a1, int a2, int a3, int a4, char a5); int __cdecl sub_61E8(int a1, int a2, int a3, int a4, int a5, int a6); int __cdecl sub_6234(int a1, int a2, int a3, int a4); int __cdecl sub_64C8(char a1, int a2, int a3, int a4, int a5); int __cdecl sub_6511(char a1, int a2, int a3, int a4, unsigned __int8 a5); int sub_6561(); int __cdecl sub_683B(int a1, int a2, int a3); int __cdecl sub_6893(int a1, int a2, int a3); int __cdecl sub_6987(unsigned __int8 a1, int a2); int __cdecl sub_6BCE(int a1, int a2); int __cdecl sub_6C92(int a1, int a2); int __cdecl sub_6CC2(int a1, unsigned __int8 a2); int __cdecl sub_6D34(int a1, int a2); int __cdecl sub_6EC6(int a1, int a2, int a3); int __cdecl sub_6EFD(int a1, int a2, char a3); int __cdecl sub_6F24(int a1, int a2); int __cdecl sub_6F8B(int a1, int a2); int __cdecl sub_7034(int a1); int sub_7AE2(); // weak int sub_7B34(); int __cdecl sub_7C00(int a1, int a2, unsigned int a3); int __cdecl sub_7E67(int a1, char a2, int a3); signed int __cdecl sub_80C5(int a1, int a2); signed int __cdecl sub_8252(int a1); signed int sub_830D(); signed int __cdecl sub_849A(int a1, int a2, int a3, char a4); signed int __cdecl sub_8AD4(int a1, int a2, int a3); int __cdecl sub_8CBD(int a1, unsigned __int8 a2); int __cdecl sub_8D02(int a1, unsigned __int8 a2); // void __usercall sub_92D9(int a1@<ebp>); int __cdecl sub_9DAC(int a1); int __cdecl sub_9E8A(int a1); int __cdecl sub_9F6C(int a1, int a2); int __cdecl sub_A03E(int a1, int a2); int __cdecl sub_A1CB(int a1, int a2); int __cdecl sub_A2BD(int a1, int a2); signed int __cdecl sub_A539(int a1, int a2, int a3, int a4); int __cdecl sub_A5CB(int a1, int a2, int a3, int a4); int __cdecl sub_A634(int a1, int a2, int a3, int a4, int a5, int a6, int a7); int sub_A762(); // weak int __cdecl sub_A82A(int a1); int sub_A874(); // weak int __cdecl sub_A8A4(int a1, int a2); int __cdecl sub_A90D(int a1, int a2); int __cdecl sub_AA03(int a1); int __cdecl sub_AA70(int a1, unsigned int a2, int a3, unsigned int *a4); int __cdecl sub_B3BF(int a1, int a2, int a3, char a4); int __cdecl sub_B563(int a1, char a2); signed int __cdecl sub_B631(int a1, int a2); int __cdecl sub_B65D(int a1, int a2); int __cdecl sub_B680(int a1); int __cdecl sub_B694(unsigned __int16 *a1, int a2); int __cdecl sub_B708(int a1); int __cdecl sub_B71B(int a1, int a2); int sub_B7E8(); // weak int __cdecl sub_B8EA(int a1); int __cdecl sub_BACB(int a1, int a2); int __cdecl sub_BC21(int a1, unsigned int a2, unsigned int a3, char a4, unsigned int a5); int __cdecl sub_BCF9(int a1, int a2, int a3, unsigned int a4, unsigned int a5); unsigned __int64 __cdecl sub_BEC7(unsigned __int64 a1, char a2); unsigned __int64 __cdecl sub_BEE3(unsigned __int64 a1, unsigned int a2, int a3); unsigned __int64 __cdecl sub_BFD0(unsigned __int64 a1, unsigned int a2, unsigned int a3); int __cdecl sub_C120(unsigned __int64 a1, __int64 a2); int __fastcall sub_12590(int a1, int a2); // int __usercall sub_14282@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4@<ebp>); int *__fastcall sub_14DDA(int a1); bool __fastcall sub_1510C(int a1); // int __usercall sub_1590E@<eax>(int a1@<ecx>, unsigned int a2@<ebx>, int a3@<edi>, int a4@<esi>); int sub_15E60(); int sub_15E87(); int __fastcall sub_15EA6(int a1, int (__fastcall *a2)(_DWORD)); int sub_15F09(); int sub_15F2E(); int sub_15F58(); int __fastcall sub_15F7A(int a1); int sub_15FD3(); int __fastcall sub_161FA(int a1); unsigned int __fastcall sub_164EA(int a1, int a2); // void __usercall sub_16F2C(char a1@<al>, int a2, int a3, int a4, int a5, int a6, int a7, int a8); int __fastcall sub_173E1(int a1); int __fastcall sub_17431(char *a1); int __fastcall sub_176AC(char a1); int __fastcall sub_176FE(char a1); int sub_17755(); // int __usercall sub_179D7@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4, int a5, int a6, __int64 a7); // int __usercall sub_17A4E@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4, int a5, int a6, __int64 a7); int __fastcall sub_17B43(unsigned __int8 a1); int __fastcall sub_17D51(int a1, int a2); int sub_17E2E(); int __fastcall sub_17E56(int a1, char a2); int __fastcall sub_17EEE(int a1, int a2); int __fastcall sub_180A8(int a1); // void __usercall sub_180DE(char a1@<al>, int a2, int a3, int a4); int sub_181AF(); int __fastcall sub_1820F(int a1, int a2); int __fastcall sub_182C1(int a1); int sub_19028(); // int __usercall sub_190F8@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, unsigned int _EBX@<ebx>); // int __usercall sub_1937A@<eax>(int a1@<eax>, char a2@<dl>, int a3@<ecx>); signed int __fastcall sub_19600(int a1, int a2); int __fastcall sub_1978E(int a1); signed int sub_1984E(); // signed int __usercall sub_199DA@<eax>(int a1@<eax>, int a2@<edx>, int (__fastcall *a3)(_DWORD)@<ecx>, unsigned int a4@<ebx>, int a5@<edi>, int a6@<esi>); // int __usercall sub_1A04A@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4, int a5, int a6, int a7, int a8, int a9, int a10); int __fastcall sub_1A263(int a1); int __fastcall sub_1A2A9(int a1); int __fastcall sub_1B38D(int a1); int __fastcall sub_1B44F(int a1); int __fastcall sub_1B544(int a1, int a2); int __fastcall sub_1B60F(int a1, int a2); // char *__usercall sub_1B7A2@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4@<ebx>, int a5@<ebp>, int a6@<edi>, int a7@<esi>); int __fastcall sub_1B8A5(int a1, int a2); // int __usercall sub_1BBDD@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4@<ebx>, int a5@<ebp>, int a6@<edi>, int a7@<esi>); // int __usercall sub_1BC39@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4@<ebx>, int a5@<ebp>, int a6@<edi>, int a7@<esi>); int __fastcall sub_1BE85(int a1); int __fastcall sub_1BEED(int a1); // int __usercall sub_1BFD6@<eax>(int a1@<ecx>, int a2@<ebx>, int a3@<ebp>, int a4@<edi>, int a5@<esi>); // void __usercall sub_1CA08(char a1@<al>); // void __usercall sub_1CCFC(char a1@<al>, int a2@<edx>, int a3@<ecx>); int __fastcall sub_1CED1(int a1, int a2); signed int __fastcall sub_1CEF1(int a1); int __fastcall sub_1CF05(int a1, int a2); signed int __fastcall sub_1CF6E(int a1); int __fastcall sub_1CF81(int a1, int a2); signed int __fastcall sub_1D14A(int a1); int __fastcall sub_1D32B(int a1, int a2); //------------------------------------------------------------------------- // Data declarations _UNKNOWN unk_0; // weak _UNKNOWN loc_1; // weak _UNKNOWN loc_4; // weak _UNKNOWN loc_7; // weak char byte_9[3] = { '\0', '\0', '\0' }; // weak _UNKNOWN unk_C; // weak int (*off_15)[6] = &dword_10C; // weak _UNKNOWN unk_20; // weak __int16 *off_29 = &word_146; // weak void *off_37 = (void *)0x400; // weak _UNKNOWN unk_3B; // weak _UNKNOWN unk_3C; // weak _UNKNOWN unk_40; // weak _UNKNOWN unk_44; // weak _UNKNOWN unk_48; // weak int dword_4C[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; // weak int dword_74[13] = { 3439965184, 1275181089, 1750344141, 1881174889, 1919381362, 1663069537, 1869508193, 1700929652, 1853190688, 544106784, 542330692, 1701080941, 168627502 }; // weak int dword_124[8] = { 16, 0, 0, 0, 0, 0, 0, 0 }; // weak int dword_158[20] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak _UNKNOWN unk_230; // weak int dword_244[4] = { 3758096416, 1952539694, 97, 0 }; // weak _UNKNOWN loc_5FE; // weak char *off_1878 = &byte_AB; // weak _UNKNOWN loc_4EA7; // weak _UNKNOWN loc_570E; // weak _UNKNOWN loc_5794; // weak _UNKNOWN loc_5E0D; // weak _UNKNOWN loc_5EF6; // weak _UNKNOWN loc_6015; // weak _UNKNOWN loc_6162; // weak _UNKNOWN loc_82C0; // weak _UNKNOWN loc_82CC; // weak _UNKNOWN loc_82E8; // weak _UNKNOWN loc_8304; // weak _UNKNOWN loc_835C; // weak _UNKNOWN loc_8399; // weak _UNKNOWN loc_83A9; // weak _UNKNOWN loc_83BD; // weak _UNKNOWN loc_88D2; // weak _UNKNOWN loc_89BE; // weak _UNKNOWN loc_8A25; // weak _UNKNOWN loc_8C5D; // weak _UNKNOWN loc_8C6F; // weak _UNKNOWN loc_8C77; // weak _UNKNOWN loc_8FEA; // weak _UNKNOWN loc_9002; // weak _UNKNOWN loc_9019; // weak _UNKNOWN loc_90A3; // weak _UNKNOWN loc_90AB; // weak _UNKNOWN loc_923D; // weak char algn_9429[3] = { '\x0F', '\x1F', '\0' }; // weak _UNKNOWN loc_94FE; // weak _UNKNOWN loc_953F; // weak _UNKNOWN loc_970F; // weak _UNKNOWN loc_97BA; // weak _UNKNOWN loc_A6A0; // weak _UNKNOWN loc_A6EC; // weak _UNKNOWN loc_A7FD; // weak _UNKNOWN loc_A84D; // weak _UNKNOWN loc_A8C6; // weak _UNKNOWN loc_AAAE; // weak _UNKNOWN loc_AAC3; // weak _UNKNOWN loc_AAE5; // weak void *off_AB14[77] = { &off_1E5, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, (void *)0x209, (void *)0x1D9, (void *)0x1F1, (void *)0x1CD, &off_254, &off_254, &unk_21D, &unk_224, &unk_224, &unk_224, &unk_224, &unk_224, &unk_224, &unk_224, &unk_224, &unk_224, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, (void *)0x1FD, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, (void *)0x1FD }; // weak _UNKNOWN loc_AC4F; // weak _UNKNOWN loc_ACB4; // weak _UNKNOWN loc_ACE1; // weak void *off_ACEC[84] = { (void *)0x8E3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x4E9, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, &loc_3C1, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, &loc_567, (void *)0x8F3, (void *)0x5E2, (void *)0x459, (void *)0x8F3, (void *)0x8F3, &loc_5FE, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x6EA, (void *)0x4E9, (void *)0x68D, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x3CF }; // weak _UNKNOWN loc_AE63; // weak _UNKNOWN loc_AE69; // weak _UNKNOWN loc_AEC7; // weak _UNKNOWN loc_AF6D; // weak _UNKNOWN loc_AFA7; // weak _UNKNOWN loc_AFCF; // weak _UNKNOWN loc_B039; // weak _UNKNOWN loc_B0A3; // weak _UNKNOWN loc_B103; // weak _UNKNOWN loc_B297; // weak _UNKNOWN loc_B301; // weak _UNKNOWN loc_B36E; // weak _UNKNOWN loc_B3D9; // weak _UNKNOWN loc_B410; // weak _UNKNOWN loc_B477; // weak _UNKNOWN loc_B640; // weak _UNKNOWN loc_B6A2; // weak _UNKNOWN loc_B6D2; // weak _UNKNOWN loc_B731; // weak _UNKNOWN loc_B7EB; // weak _UNKNOWN loc_B837; // weak _UNKNOWN loc_B886; // weak int dword_C3B2 = 0; // weak int dword_C3B8[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak char byte_C3F9[3] = { '\0', '\0', '\0' }; // weak __int16 word_C3FE = 0; // weak int dword_C404[14] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak __int16 word_C43E = 0; // weak int dword_C444[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak int dword_C474[6] = { 0, 0, 0, 0, 0, 0 }; // weak int dword_C6A4[111] = { 670309, 1681010725, 540876858, 807761968, 807761970, 622884914, 628634160, 544748080, 2016555045, 2016555045, 842016032, 842016120, 2680, 1953719636, 1887007776, 1868963941, 1634476146, 1176532083, 1914721347, 1998614133, 622883681, 173551920, 1414743296, 1280114783, 21058, 1330795077, 1397039186, 1701519444, 2019893369, 1937011561, 1953849888, 544434464, 544501614, 561276275, 10, 1197425744, 1631876197, 540696948, 1380076621, 622869792, 1696607332, 540701298, 1814394928, 673216620, 1814394928, 170489964, 1112296704, 1701519442, 1936269433, 1953459744, 1952805664, 10, 1819635523, 1948741220, 1952802592, 1112296736, 1701519442, 1953702009, 1937077345, 1951606816, 1937077345, 628633661, 695744560, 1280114698, 1797280322, 1763735909, 1702043763, 1869881460, 667680, 1380076621, 2036689696, 544434464, 544499059, 824209268, 1160183818, 660558931, 2036689696, 544434464, 544499059, 824209268, 10, 1414743335, 1797269343, 1763735909, 1869488243, 1702043764, 1919885428, 1952805664, 544175136, 2608, 1330795077, 1280122962, 1699881026, 1667329136, 1109419109, 1025537129, 744760608, 1414743328, 1953055264, 622869792, 2660, 1330795077, 1397039186, 1701519444, 1634214009, 1330520179, 1700929620, 1663069797, 1918985580, 169960549, 0 }; // weak char byte_CB71[3] = { '0', '0', '0' }; // weak char byte_CB79[3] = { '0', '2', 'x' }; // weak int dword_CB84[4] = { 2112120, 536879136, 2105376, 1769104723 }; // weak char byte_CBFB = '\0'; // weak int dword_CCC4[5] = { 1953460066, 1952542765, 1931804776, 7546173, 1953396050 }; // weak _UNKNOWN unk_CCDB; // weak int dword_CD14[254] = { 1684107116, 1986622020, 690516581, 10, 1869377109, 1852400737, 1919164519, 1919252073, 1936467232, 10, 1869377109, 1917084769, 1919252073, 1663052072, 1819307375, 1684370533, 1953703968, 1937077345, 2015699002, 1006635561, 1819047278, 1920234272, 1046965865, 1668633344, 1936942435, 1634683904, 1917132900, 7499634, 1635151433, 543451500, 1634885968, 1702126957, 1851064434, 1886418291, 1702130287, 1631715428, 1967267940, 1919247974, 2053722912, 1967259749, 1919247974, 1869567008, 1634554656, 1308650604, 1377858671, 2036621669, 1986348032, 543515497, 1869771333, 1918304370, 543519849, 1953460816, 1702126437, 1968111716, 1718558836, 1936020000, 1668445551, 1442870117, 1836412015, 1866670181, 1886745202, 1867907188, 1701672300, 1819624992, 1867382892, 1684360480, 1291870569, 1634296933, 1634231072, 1684367214, 1953451520, 1970226720, 1090544750, 1936024419, 1698963571, 1684367726, 544165376, 1886610770, 1702063727, 544165376, 1886413165, 6778473, 1701669204, 1953853216, 1953451520, 1635021600, 1684370546, 1919697152, 2036621669, 1635021600, 1684370546, 1868710144, 1684370546, 1296255232, 1917132880, 7499634, 1347700308, 1920091424, 1342206575, 1869901682, 543977315, 1869771333, 1633091698, 1852403314, 1851072615, 2003791467, 1816600686, 6844537, 1852989783, 543649385, 1701602628, 1176528244, 1970039137, 1459643762, 1768845921, 1461741422, 1702127986, 1767982624, 1701999980, 1918981888, 1735289198, 1718960672, 544367974, 544173908, 1818324307, 108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak __int16 aRifyIctWasRunA[28] = { 114, 105, 102, 121, 32, 73, 67, 84, 32, 87, 97, 115, 32, 82, 117, 110, 32, 65, 110, 100, 32, 80, 97, 115, 115, 101, 100, 0 }; // weak __int16 aRifyIctWasRu_0[44] = { 114, 105, 102, 121, 32, 73, 67, 84, 32, 119, 97, 115, 32, 114, 117, 110, 32, 97, 110, 100, 32, 108, 97, 115, 116, 32, 105, 116, 101, 114, 97, 116, 105, 111, 110, 32, 112, 97, 115, 115, 101, 100, 46, 0 }; // weak int dword_D1AC[8] = { 2621440, 7077987, 7536737, 3997811, 5046306, 4325452, 2687010, 0 }; // weak __int16 aRifyEstBitSetT[22] = { 114, 105, 102, 121, 32, 69, 83, 84, 32, 66, 105, 116, 32, 83, 101, 116, 32, 84, 101, 115, 116, 0 }; // weak __int16 aRifyTheExtende[43] = { 114, 105, 102, 121, 32, 84, 104, 101, 32, 69, 120, 116, 101, 110, 100, 101, 100, 32, 83, 101, 114, 118, 105, 99, 101, 32, 84, 101, 115, 116, 32, 66, 105, 116, 32, 105, 115, 32, 115, 101, 116, 46, 0 }; // weak _UNKNOWN unk_DD00; // weak _UNKNOWN off_DD50; // weak _UNKNOWN unk_E01C; // weak __int16 aSetmlbreplaced[15] = { 83, 101, 116, 77, 76, 66, 82, 101, 112, 108, 97, 99, 101, 100, 0 }; // weak int dword_E045 = 1107315712; // weak __int16 aGetrtcramsize[14] = { 71, 101, 116, 82, 84, 67, 82, 97, 109, 83, 105, 122, 101, 0 }; // weak _UNKNOWN unk_E06C; // weak __int16 aNdleprotocolEr[26] = { 110, 100, 108, 101, 80, 114, 111, 116, 111, 99, 111, 108, 32, 69, 114, 114, 111, 114, 58, 32, 48, 120, 37, 120, 10, 0 }; // weak __int16 a16450Compatabl[30] = { 49, 54, 52, 53, 48, 32, 99, 111, 109, 112, 97, 116, 97, 98, 108, 101, 32, 83, 101, 114, 105, 97, 108, 32, 80, 111, 114, 116, 10, 0 }; // weak __int16 a16550Compatabl[30] = { 49, 54, 53, 53, 48, 32, 99, 111, 109, 112, 97, 116, 97, 98, 108, 101, 32, 83, 101, 114, 105, 97, 108, 32, 80, 111, 114, 116, 10, 0 }; // weak __int16 aDirectionalPar[28] = { 45, 100, 105, 114, 101, 99, 116, 105, 111, 110, 97, 108, 32, 112, 97, 114, 97, 108, 108, 101, 108, 32, 112, 111, 114, 116, 10, 0 }; // weak __int16 aBaseSystemPeri[29] = { 32, 32, 32, 66, 97, 115, 101, 32, 83, 121, 115, 116, 101, 109, 32, 80, 101, 114, 105, 112, 104, 101, 114, 97, 108, 115, 44, 32, 0 }; // weak __int16 aNeric8259Progr[38] = { 110, 101, 114, 105, 99, 32, 56, 50, 53, 57, 32, 80, 114, 111, 103, 114, 97, 109, 109, 98, 108, 101, 32, 73, 110, 116, 101, 114, 114, 117, 112, 116, 32, 67, 111, 110, 116, 114 }; // weak __int16 aOgrammableInte[33] = { 111, 103, 114, 97, 109, 109, 97, 98, 108, 101, 32, 73, 110, 116, 101, 114, 114, 117, 112, 116, 32, 67, 111, 110, 116, 114, 111, 108, 108, 101, 114, 10, 0 }; // weak _UNKNOWN unk_EAE6; // weak __int16 aNeric8237DmaCo[27] = { 110, 101, 114, 105, 99, 32, 56, 50, 51, 55, 32, 68, 77, 65, 32, 99, 111, 110, 116, 114, 111, 108, 108, 101, 114, 10, 0 }; // weak __int16 aNtium[7] = { 110, 116, 105, 117, 109, 10, 0 }; // weak _UNKNOWN unk_EDBB; // weak __int16 aSerialBusContr[27] = { 32, 32, 32, 83, 101, 114, 105, 97, 108, 32, 66, 117, 115, 32, 67, 111, 110, 116, 114, 111, 108, 108, 101, 114, 44, 32, 0 }; // weak __int16 aRewireIeee1394[19] = { 114, 101, 119, 105, 114, 101, 40, 73, 69, 69, 69, 32, 49, 51, 57, 52, 41, 10, 0 }; // weak __int16 a8x04x04x02x02x[47] = { 56, 120, 45, 37, 48, 52, 120, 45, 37, 48, 52, 120, 45, 37, 48, 50, 120, 37, 48, 50, 120, 45, 37, 48, 50, 120, 37, 48, 50, 120, 37, 48, 50, 120, 37, 48, 50, 120, 37, 48, 50, 120, 37, 48, 50, 120, 0 }; // weak int dword_EF40[20] = { 2424832, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak int dword_EF90[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak int dword_EFB4 = 0; // weak int dword_EFBC[4] = { 0, 0, 0, 0 }; // weak int dword_EFCC = 0; // weak int dword_EFD0[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak int dword_F010[48] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak int dword_F0D0[32] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak int dword_F150[21] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak _UNKNOWN unk_F6B8; // weak int dword_FA94[104] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak int dword_FC3C[2] = { 0, 0 }; // weak int dword_FC44[2] = { 0, 0 }; // weak int dword_FC74[3] = { 0, 0, 0 }; // weak int dword_10000[640] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak _UNKNOWN unk_10C3E; // weak //----- (00001641) -------------------------------------------------------- int __cdecl sub_1641(int a1, int a2) { int result; // eax@1 _EAX = a1; __asm { cpuid } *(_DWORD *)a2 = _EAX; *(_DWORD *)(a2 + 4) = _EBX; result = a2 + 8; *(_DWORD *)(a2 + 8) = _ECX; *(_DWORD *)(a2 + 12) = _EDX; return result; } //----- (00001849) -------------------------------------------------------- int __cdecl sub_1849(int a1, int a2) { int v3; // [sp+28h] [bp-10h]@3 int v4; // [sp+2Ch] [bp-Ch]@3 if ( (unsigned int)a2 <= 7 ) JUMPOUT(__CS__, (&off_1878)[4 * a2] + 6229); (*(void (__cdecl **)(int, signed int, int *))(a1 + 12))(a1, 1296843359, &v3); if ( v4 >= 0 ) sub_61E8(1296843359, v3, a2, v4, 0, 0); else sub_6234(1296843359, v3, a2, v4); return v4; } // 1878: using guessed type char *off_1878; //----- (00001BAC) -------------------------------------------------------- signed int __cdecl sub_1BAC(int a1) { char v1; // ST14_1@9 int v2; // ST34_4@10 int v3; // ST30_4@10 int v4; // ST2C_4@10 int v5; // ST28_4@10 int v6; // ST24_4@10 int v7; // ST20_4@10 int v8; // ST1C_4@10 int v9; // ST18_4@10 unsigned __int64 v10; // rax@17 signed int v12; // [sp+5Ch] [bp-8Ch]@3 unsigned __int64 v13; // [sp+78h] [bp-70h]@5 char v14[32]; // [sp+86h] [bp-62h]@7 unsigned __int16 v15; // [sp+A6h] [bp-42h]@1 char v16; // [sp+A9h] [bp-3Fh]@1 __int16 v17; // [sp+AAh] [bp-3Eh]@1 char v18; // [sp+ACh] [bp-3Ch]@2 int v19; // [sp+BCh] [bp-2Ch]@1 int v20; // [sp+C0h] [bp-28h]@1 int v21; // [sp+C4h] [bp-24h]@1 char v22; // [sp+CBh] [bp-1Dh]@1 unsigned int i; // [sp+CCh] [bp-1Ch]@9 v20 = 0; v22 = 2; (*(void (__cdecl **)(int, signed int, int *))(a1 + 12))(a1, 1296843359, &v19); v17 = 2; v21 = sub_64C8(v22, (int)&dword_C3B2, (int)&v15, (int)&v17, (int)&v16); if ( v21 >= 0 ) { v17 = 8; v21 = sub_64C8(v22, (int)&word_C3FE, (int)&v13, (int)&v17, (int)&v16); if ( v21 >= 0 ) { v17 = 32; v21 = sub_64C8(v22, (int)&word_C43E, (int)v14, (int)&v17, (int)&v16); if ( v21 >= 0 ) { sub_5FAF(1296843359, 1480868423, v19, (int)dword_C474, v15); sub_5FAF(1296843359, 1480868423, v19, (int)"cate the SmcIo Protocol\n", v1); for ( i = 0; i <= 0x1F; i += 8 ) { v2 = (unsigned __int8)v14[i + 7]; v3 = (unsigned __int8)v14[i + 6]; v4 = (unsigned __int8)v14[i + 5]; v5 = (unsigned __int8)v14[i + 4]; v6 = (unsigned __int8)v14[i + 3]; v7 = (unsigned __int8)v14[i + 2]; v8 = (unsigned __int8)v14[i + 1]; v9 = (unsigned __int8)v14[i]; sub_5FAF(1296843359, 1480868423, v19, (int)"Io Protocol\n", i); } if ( v15 > 0x40u ) v15 = 64; if ( v15 & 1 ) sub_5FAF(1296843359, 1481856065, v19, (int)"dge\n", (unsigned __int8)v14[(v15 - 1) / 2] >> 4); else sub_5FAF(1296843359, 1481856065, v19, (int)"dge\n", v14[(v15 - 1) / 2] & 0xF); v10 = v13 >> ((64 - v15) & 0x1F); if ( (64 - (_BYTE)v15) & 0x20 ) LOBYTE(v10) = v13 >> ((64 - v15) & 0x1F) >> 32; if ( v10 & 1 ) v20 = 0; else v20 = 1073741846; v12 = v20; } else { sub_5FAF(1296843359, 1480938066, v19, (int)dword_C444, v21); v12 = 1073741826; } } else { sub_5FAF(1296843359, 1480938066, v19, (int)dword_C404, v21); v12 = 1073741826; } } else { sub_5FAF(1296843359, 1481856065, v19, (int)dword_C3B8, v21); v17 = 16; v21 = sub_64C8(v22, (int)byte_C3F9, (int)&v18, (int)&v17, (int)&v16); if ( v21 >= 0 ) v12 = v20; else v12 = 1073741826; } return v12; } // C3B2: using guessed type int dword_C3B2; // C3B8: using guessed type int dword_C3B8[16]; // C3FE: using guessed type __int16 word_C3FE; // C404: using guessed type int dword_C404[14]; // C43E: using guessed type __int16 word_C43E; // C444: using guessed type int dword_C444[12]; // C474: using guessed type int dword_C474[6]; // 1BAC: using guessed type char var_62[32]; //----- (000023C4) -------------------------------------------------------- signed int sub_23C4() { int v2; // [sp+30h] [bp-38h]@1 char v3; // [sp+36h] [bp-32h]@1 __int16 v4; // [sp+46h] [bp-22h]@2 char v5; // [sp+48h] [bp-20h]@2 char v6; // [sp+49h] [bp-1Fh]@2 char v7; // [sp+4Ah] [bp-1Eh]@2 int v8; // [sp+58h] [bp-10h]@1 char v9; // [sp+5Eh] [bp-Ah]@1 unsigned __int8 v10; // [sp+5Fh] [bp-9h]@2 v8 = 0; v9 = 2; v2 = 16; v8 = (*(int (__cdecl **)(_DWORD, int, _DWORD, int *, char *))(unk_0 + 48))(L"ailed", dword_FC3C[0], 0, &v2, &v3); if ( v8 < 0 ) { if ( v8 == -2147483634 ) return -2147483622; return v8; } v5 = 1; v6 = -2; v7 = 0; v4 = 2; v8 = sub_6511(v9, (int)byte_C3F9, (int)&v5, (int)&v4, v10); if ( v8 >= 0 ) { v8 = sub_6561(); if ( v8 < 0 ) return v8; return v8; } return v8; } // DCAC: using guessed type __int16 aAiled[6]; // FC3C: using guessed type int dword_FC3C[2]; //----- (00002D22) -------------------------------------------------------- signed int sub_2D22() { int v0; // ST24_4@23 signed int v2; // [sp+Ch] [bp-2Ch]@3 __int16 v3; // [sp+1Eh] [bp-1Ah]@4 __int16 v4; // [sp+1Eh] [bp-1Ah]@11 __int16 v5; // [sp+1Eh] [bp-1Ah]@18 __int16 v6; // [sp+1Eh] [bp-1Ah]@25 int v7; // [sp+24h] [bp-14h]@1 unsigned int i; // [sp+28h] [bp-10h]@4 unsigned int j; // [sp+28h] [bp-10h]@11 unsigned int k; // [sp+28h] [bp-10h]@18 unsigned int l; // [sp+28h] [bp-10h]@25 signed int v12; // [sp+2Ch] [bp-Ch]@1 int v13; // [sp+2Ch] [bp-Ch]@9 int v14; // [sp+2Ch] [bp-Ch]@16 int v15; // [sp+2Ch] [bp-Ch]@23 v12 = -2097152; v7 = vFFE00020; if ( vFFE00028 == 1213613663 || (v12 = -4194304, v7 = vFFC00020, vFFC00028 == 1213613663) ) { v3 = 0; for ( i = 0; i <= 0x1F; ++i ) v3 += *(_WORD *)(v12 + 2 * i); if ( v3 ) { v2 = 0x40000000; } else { v13 = v7 + v12; if ( *(_DWORD *)(v13 + 40) == 1213613663 ) { v4 = 0; for ( j = 0; j <= 0x1F; ++j ) v4 += *(_WORD *)(v13 + 2 * j); if ( v4 ) { v2 = 1073741839; } else { v14 = *(_DWORD *)(v13 + 32) + v13; if ( *(_DWORD *)(v14 + 40) == 1213613663 ) { v5 = 0; for ( k = 0; k <= 0x1F; ++k ) v5 += *(_WORD *)(v14 + 2 * k); if ( v5 ) { v2 = 1073741840; } else { v15 = *(_DWORD *)(v14 + 32) + v14; v0 = *(_DWORD *)(v15 + 32); if ( *(_DWORD *)(v15 + 40) == 1213613663 ) { v6 = 0; for ( l = 0; l <= 0x1F; ++l ) v6 += *(_WORD *)(v15 + 2 * l); if ( v6 ) v2 = 1073741842; else v2 = 0; } else { v2 = 1073741841; } } } else { v2 = 1073741838; } } } else { v2 = 1073741837; } } } else { v2 = 1073741836; } return v2; } //----- (00002F3A) -------------------------------------------------------- int __cdecl sub_2F3A(int a1) { int v2; // [sp+18h] [bp-10h]@1 int v3; // [sp+1Ch] [bp-Ch]@1 v3 = 0; v2 = 0; sub_3392(a1, 76, (int)&v2, 1u); v2 = 0; sub_3392(a1, 71, (int)&v2, 1u); v2 = 254; sub_3392(a1, 68, (int)&v2, 1u); return v3; } //----- (000030A3) -------------------------------------------------------- int __cdecl sub_30A3(int a1) { int v2; // [sp+18h] [bp-10h]@1 int v3; // [sp+1Ch] [bp-Ch]@1 v3 = 0; sub_3392(a1, 68, (int)&v2, 0); if ( (unsigned __int8)v2 == 253 ) { v3 = -1073741819; } else if ( v2 & 0x20000000 ) { v3 = -1073741818; } else if ( (unsigned __int8)v2 == 254 ) { sub_3392(a1, 76, (int)&v2, 0); if ( v2 & 1 ) v3 = 1073741829; if ( v2 & 2 ) v3 = 1073741830; if ( v2 & 4 ) v3 = 1073741831; if ( v2 & 8 ) v3 = 1073741832; if ( v2 & 0x10 ) v3 = 1073741833; } else { v3 = -1073741822; } v2 = 0; sub_3392(a1, 76, (int)&v2, 1u); v2 = 0; sub_3392(a1, 71, (int)&v2, 1u); return v3; } //----- (000031EB) -------------------------------------------------------- int __cdecl sub_31EB(int a1) { int v2; // [sp+18h] [bp-10h]@1 int v3; // [sp+1Ch] [bp-Ch]@1 v3 = 0; v2 = 0; sub_3392(a1, 76, (int)&v2, 1u); v2 = 31; v3 = sub_3392(a1, 72, (int)&v2, 1u); v2 = 128; return sub_3392(a1, 71, (int)&v2, 1u); } //----- (00003392) -------------------------------------------------------- int __cdecl sub_3392(int a1, int a2, int a3, unsigned int a4) { int v5; // [sp+2Ch] [bp-13Ch]@2 char v6[68]; // [sp+4Ch] [bp-11Ch]@1 unsigned __int8 v7; // [sp+90h] [bp-D8h]@3 unsigned __int8 v8; // [sp+91h] [bp-D7h]@3 unsigned __int8 v9; // [sp+92h] [bp-D6h]@3 unsigned __int8 v10; // [sp+93h] [bp-D5h]@3 unsigned __int8 v11; // [sp+94h] [bp-D4h]@3 unsigned __int8 v12; // [sp+95h] [bp-D3h]@3 unsigned __int8 v13; // [sp+96h] [bp-D2h]@3 unsigned __int8 v14; // [sp+97h] [bp-D1h]@3 unsigned __int8 v15; // [sp+98h] [bp-D0h]@3 unsigned __int8 v16; // [sp+99h] [bp-CFh]@3 unsigned __int8 v17; // [sp+9Ah] [bp-CEh]@3 unsigned __int8 v18; // [sp+9Bh] [bp-CDh]@3 int v19; // [sp+14Ch] [bp-1Ch]@1 int v20; // [sp+150h] [bp-18h]@1 int v21; // [sp+154h] [bp-14h]@3 int v22; // [sp+158h] [bp-10h]@3 int v23; // [sp+15Ch] [bp-Ch]@3 v20 = ((int (__cdecl *)(_DWORD))**(_DWORD **)L"4x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x")(*(_DWORD *)L"4x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x"); v19 = (*(int (__cdecl **)(_DWORD, _DWORD, int, _DWORD))(*(_DWORD *)L"4x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x" + 4))( *(_DWORD *)L"4x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", v6, v20, 0); if ( v19 >= 0 ) { v22 = (v13 << 16) + (v12 << 8) + v11 + (v14 << 24); v21 = (v17 << 16) + (v16 << 8) + v15 + (v18 << 24); v23 = (v9 << 16) + (v8 << 8) + v7 + (v10 << 24); if ( a4 ) { v6[a2] = *(_DWORD *)a3 % 0xFFu; if ( a4 > 1 ) v6[a2 + 1] = (*(_DWORD *)a3 >> 8) % 0xFFu; if ( a4 > 2 ) v6[a2 + 2] = (*(_DWORD *)a3 >> 16) % 0xFFu; if ( a4 > 3 ) v6[a2 + 3] = (*(_DWORD *)a3 >> 24) % 0xFFu; (*(void (__cdecl **)(_DWORD, char *, signed int, int))(*(_DWORD *)L"4x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x" + 8))( *(_DWORD *)L"4x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", &v6[a2], 4, a2); } else { *(_DWORD *)a3 = ((unsigned __int8)v6[a2 + 2] << 16) + ((unsigned __int8)v6[a2 + 1] << 8) + (unsigned __int8)v6[a2] + ((unsigned __int8)v6[a2 + 3] << 24); } v5 = v19; } else { v5 = v19; } return v5; } // EEA8: using guessed type __int16 a8x04x04x02x02x[47]; // 3392: using guessed type char var_11C[68]; //----- (00003E75) -------------------------------------------------------- // write access to const memory has been detected, the output may be wrong! int __cdecl sub_3E75(int a1) { int result; // eax@7 int v2; // [sp+Ch] [bp-1Ch]@2 signed int i; // [sp+1Ch] [bp-Ch]@4 if ( a1 ) v2 = a1; else v2 = 5489; dword_F150[0] = v2; for ( i = 1; i <= 623; ++i ) dword_F150[i] = i + 1812433253 * (dword_F150[i - 1] ^ ((unsigned int)dword_F150[i - 1] >> 30)); result = (int)dword_F0D0; dword_F0D0[0] = 1; return result; } // 3EA1: write access to const memory at F150 has been detected // 3EF4: write access to const memory at F0D0 has been detected // F0D0: using guessed type int dword_F0D0[32]; // F150: using guessed type int dword_F150[21]; //----- (0000412E) -------------------------------------------------------- bool __cdecl sub_412E(int a1) { int v3; // [sp+24h] [bp-24h]@1 signed int v4; // [sp+2Ch] [bp-1Ch]@1 int i; // [sp+30h] [bp-18h]@1 int v6; // [sp+38h] [bp-10h]@2 int v7; // [sp+3Ch] [bp-Ch]@4 v3 = sub_7034(a1); v4 = 0; for ( i = 0; i < v3; ++i ) { v6 = sub_6C92((int)dword_EF90, *(_BYTE *)(a1 - 1 + v3 - i)); if ( !v6 ) return 0; v7 = v6 - (_DWORD)dword_EF90; if ( i & 1 ) v4 += 3 * v7; else v4 += v7; } return v4 % 34 == 0; } // EF90: using guessed type int dword_EF90[9]; //----- (000048DC) -------------------------------------------------------- // write access to const memory has been detected, the output may be wrong! signed int __cdecl sub_48DC(int a1) { int (__cdecl *v1)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD); // edi@12 int v2; // esi@12 int v3; // eax@12 int (__cdecl *v4)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD); // edi@17 int v5; // esi@17 int v6; // eax@17 int v7; // eax@24 char v9; // [sp+10h] [bp-358h]@0 char v11[256]; // [sp+34h] [bp-334h]@20 __int16 v12; // [sp+134h] [bp-234h]@19 int v13; // [sp+334h] [bp-34h]@2 int v14; // [sp+338h] [bp-30h]@1 int v15; // [sp+33Ch] [bp-2Ch]@1 int i; // [sp+340h] [bp-28h]@8 int j; // [sp+344h] [bp-24h]@20 char v18; // [sp+34Bh] [bp-1Dh]@1 int v19; // [sp+34Ch] [bp-1Ch]@30 v14 = 0; v18 = 0; v15 = (*(int (__cdecl **)(_DWORD, _DWORD, int *))(unk_0 + 172))(0, 0, &dword_EFCC); if ( !v15 ) return v15; v15 = (*(int (__cdecl **)(int, int, int *))(unk_0 + 88))(a1, dword_FC44[0], &v13); if ( !v15 ) { if ( !*(_DWORD *)(v13 + 16) ) { sub_5FAF(1952673887, 1480938066, 0, (int)"hic Arts Prepress Device", v9); return -2147483646; } v15 = (*(int (__cdecl **)(_DWORD, _DWORD, int *))(unk_0 + 88))(*(_DWORD *)(v13 + 12), 0, &v14); if ( v15 ) return v15; for ( i = v14; (*(_BYTE *)i & 0x7F) != 127 || *(_BYTE *)(i + 1) != -1; i += *(_BYTE *)(i + 2) | (*(_BYTE *)(i + 3) << 8) ) { if ( (*(_BYTE *)i & 0x7F) == 3 && (*(_BYTE *)(i + 1) == 11 || *(_BYTE *)(i + 1) == 12) ) { v14 = sub_A03E(v14, *(_DWORD *)(v13 + 16)); sub_80C5(v14, 0); v18 = 1; v1 = *(int (__cdecl **)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))(unk_0 + 56); v2 = v14; v3 = sub_9DAC(v14); v15 = v1(&unk_DD00, dword_EFBC, 2, v3, v2); (*(void (__cdecl **)(int))(unk_0 + 48))(v14); break; } } if ( !v18 ) { v4 = *(int (__cdecl **)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))(unk_0 + 56); v5 = v14; v6 = sub_9DAC(v14); v15 = v4(&unk_DD00, dword_EFBC, 2, v6, v5); } if ( !v15 ) { if ( sub_80C5(*(_DWORD *)(v13 + 16), (int)&v12) ) { v11[0] = 0; v15 = sub_54CB((int)"ices Device", (int)"ptical Memory Device"); } else { sub_6893((int)&v12, (int)v11, 256); for ( j = 0; ; ++j ) { v7 = sub_7034((int)v11); if ( v7 <= j ) break; if ( v11[j] == 92 ) v11[j] = 47; } if ( sub_6F8B((int)v11, (int)"r") && !sub_6D34((int)v11, (int)"Enclosure Services Device") && !sub_6D34((int)v11, (int)"re Services Device") && v11[sub_7034((int)v11) - 1] != 47 ) sub_6BCE((int)v11, (int)"r"); v19 = sub_6CC2((int)v11, 0x2Fu); if ( v19 ) { ++v19; *(_BYTE *)v19 = 0; } if ( v11[sub_7034((int)v11) - 1] != 47 ) sub_6BCE((int)v11, (int)"r"); if ( sub_7034((int)v11) ) v15 = sub_54CB((int)"ices Device", (int)v11); } } if ( v18 ) { sub_6BCE((int)v11, (int)"lified Direct Access Device"); sub_683B((int)v11, (int)&v12, 256); } else { v12 = 0; } sub_BACB((int)&v12, (int)L"location"); if ( !v15 ) v15 = sub_849A(a1, (int)&v12, (int)&dword_EFB4, 0); if ( v15 ) sub_B563((int)&off_DD50, v15); else v15 = (*(int (__cdecl **)(_DWORD, _DWORD, int *))(unk_0 + 172))(0, 0, &dword_EFCC); return v15; } return v15; } // 4DFE: write access to const memory at EFB8 has been detected // DD18: using guessed type __int16 aLocation[9]; // EFB4: using guessed type int dword_EFB4; // EFB8: using guessed type int dword_EFB8; // EFBC: using guessed type int dword_EFBC[4]; // EFCC: using guessed type int dword_EFCC; // FC44: using guessed type int dword_FC44[2]; // 48DC: using guessed type char var_334[256]; //----- (00004E73) -------------------------------------------------------- int __cdecl sub_4E73(int a1, int a2) { return unk_20(a1, a2); } //----- (00004EA0) -------------------------------------------------------- int __cdecl sub_4EA0(int a1) { return ((int (__cdecl *)(int))unk_10C3E)(a1); } //----- (00004EC6) -------------------------------------------------------- int __cdecl sub_4EC6(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8) { return (*(int (__cdecl **)(int, int, int, int, int, int, int, int))((char *)&off_37 + 1))( a1, a2, a3, a4, a5, a6, a7, a8); } // 37: using guessed type void *off_37; //----- (00004F1D) -------------------------------------------------------- int __cdecl sub_4F1D(int a1, int a2) { return unk_3C(a1, a2); } //----- (00004F4A) -------------------------------------------------------- int __cdecl sub_4F4A(int a1, int a2) { return unk_40(a1, a2); } //----- (00004F77) -------------------------------------------------------- int __cdecl sub_4F77(int a1) { return unk_44(a1); } //----- (00004F9D) -------------------------------------------------------- int __cdecl sub_4F9D(int a1, int a2, int a3, int a4, __int16 a5, int a6, __int16 a7) { __int16 v7; // ST1C_2@1 __int16 v8; // ST14_2@1 v7 = a7; v8 = a5; return unk_48(a1, a2, a3, a4); } //----- (00004FF8) -------------------------------------------------------- int __cdecl sub_4FF8(int a1) { return ((int (__cdecl *)(int))dword_4C[0])(a1); } // 4C: using guessed type int dword_4C[8]; //----- (000051CE) -------------------------------------------------------- int __cdecl sub_51CE(int a1, int a2, int a3, int a4) { return ((int (__cdecl *)(int, int, int, int))dword_74[11])(a1, a2, a3, a4); } // 74: using guessed type int dword_74[13]; //----- (000054CB) -------------------------------------------------------- int __cdecl sub_54CB(int a1, int a2) { char v3; // [sp+28h] [bp-210h]@1 int v4; // [sp+22Ch] [bp-Ch]@2 sub_683B(a1, (int)&v3, 256); if ( a2 ) v4 = sub_7034(a2) + 1; else v4 = 0; return (*(int (__cdecl **)(char *, _DWORD, signed int, int, int))(unk_0 + 56))(&v3, dword_EFBC, 2, v4, a2); } // EFBC: using guessed type int dword_EFBC[4]; //----- (00005FAF) -------------------------------------------------------- int __cdecl sub_5FAF(int a1, int a2, int a3, int a4, char a5) { return ((int (__cdecl *)(int, int, int, int, char *))dword_158[12])(a1, a2, a3, a4, &a5); } // 158: using guessed type int[20]; //----- (000061E8) -------------------------------------------------------- int __cdecl sub_61E8(int a1, int a2, int a3, int a4, int a5, int a6) { return ((int (__cdecl *)(int, int, int, int, int, int))dword_158[18])(a1, a2, a3, a4, a5, a6); } // 158: using guessed type int dword_158[20]; //----- (00006234) -------------------------------------------------------- int __cdecl sub_6234(int a1, int a2, int a3, int a4) { return ((int (__cdecl *)(int, int, int, int))dword_158[17])(a1, a2, a3, a4); } // 158: using guessed type int dword_158[20]; //----- (00006374) -------------------------------------------------------- #error "6399: positive sp value has been found (funcsize=13)" //----- (000064C8) -------------------------------------------------------- int __cdecl sub_64C8(char a1, int a2, int a3, int a4, int a5) { return loc_4(a1, a2, a3, a4, a5); } //----- (00006511) -------------------------------------------------------- int __cdecl sub_6511(char a1, int a2, int a3, int a4, unsigned __int8 a5) { return (*(int (__cdecl **)(_DWORD, int, int, int, _DWORD))((char *)&loc_7 + 1))(a1, a2, a3, a4, a5); } //----- (00006561) -------------------------------------------------------- int sub_6561() { return unk_C(); } //----- (0000683B) -------------------------------------------------------- int __cdecl sub_683B(int a1, int a2, int a3) { int v4; // [sp+8h] [bp-10h]@1 int i; // [sp+Ch] [bp-Ch]@1 v4 = a2; for ( i = 0; *(_BYTE *)a1 && a3 - 1 > i; ++i ) { *(_WORD *)a2 = *(_BYTE *)a1; a2 += 2; ++a1; } if ( a3 - 1 > i ) *(_WORD *)a2 = 0; return v4; } //----- (00006893) -------------------------------------------------------- int __cdecl sub_6893(int a1, int a2, int a3) { int v4; // [sp+8h] [bp-10h]@1 int i; // [sp+Ch] [bp-Ch]@1 v4 = a2; for ( i = 0; *(_WORD *)a1 && a3 - 1 > i; ++i ) { *(_BYTE *)a2++ = *(_WORD *)a1; a1 += 2; } if ( a3 - 1 > i ) *(_BYTE *)a2 = 0; return v4; } //----- (00006987) -------------------------------------------------------- int __cdecl sub_6987(unsigned __int8 a1, int a2) { return ((int (__cdecl *)(_DWORD, int))dword_124[1])(a1, a2); } // 124: using guessed type int[8]; //----- (00006BCE) -------------------------------------------------------- int __cdecl sub_6BCE(int a1, int a2) { char v2; // al@4 int v4; // [sp+4h] [bp-14h]@1 int v5; // [sp+8h] [bp-10h]@1 v4 = 0; v5 = 0; while ( *(_BYTE *)(a1 + v4) ) ++v4; do { *(_BYTE *)(a1 + v4) = *(_BYTE *)(a2 + v5); v2 = *(_BYTE *)(a1 + v4++) != 0; ++v5; } while ( v2 ); return a1; } //----- (00006C92) -------------------------------------------------------- int __cdecl sub_6C92(int a1, int a2) { return unk_230(a1, a2); } //----- (00006CC2) -------------------------------------------------------- int __cdecl sub_6CC2(int a1, unsigned __int8 a2) { int v3; // [sp+8h] [bp-20h]@6 int v4; // [sp+Ch] [bp-1Ch]@8 int v5; // [sp+10h] [bp-18h]@1 int v6; // [sp+14h] [bp-14h]@1 v5 = a1 - 1; v6 = 0; while ( 1 ) { ++v5; if ( !*(_BYTE *)v5 ) break; if ( *(_BYTE *)v5 == a2 ) v6 = v5; } if ( v6 ) { v3 = v6; } else { if ( a2 ) v4 = 0; else v4 = v5; v3 = v4; } return v3; } //----- (00006D34) -------------------------------------------------------- int __cdecl sub_6D34(int a1, int a2) { int v3; // [sp+Ch] [bp-2Ch]@3 int v4; // [sp+14h] [bp-24h]@1 int v5; // [sp+28h] [bp-10h]@5 int v6; // [sp+2Ch] [bp-Ch]@5 v4 = a1 - 1; if ( a2 && *(_BYTE *)a2 ) { while ( 1 ) { ++v4; if ( !*(_BYTE *)v4 ) break; if ( *(_BYTE *)v4 == *(_BYTE *)a2 ) { v5 = v4 - 1; v6 = a2 - 1; do { ++v5; ++v6; } while ( *(_BYTE *)v5 == *(_BYTE *)v6 && *(_BYTE *)v5 ); if ( !*(_BYTE *)v6 ) return v4; } } v3 = 0; } else { v3 = a1; } return v3; } //----- (00006EC6) -------------------------------------------------------- int __cdecl sub_6EC6(int a1, int a2, int a3) { return ((int (__cdecl *)(int, int, int))dword_244[3])(a1, a2, a3); } // 244: using guessed type int[4]; //----- (00006EFD) -------------------------------------------------------- int __cdecl sub_6EFD(int a1, int a2, char a3) { return sub_6EC6(a1, a2, (int)&a3); } //----- (00006F24) -------------------------------------------------------- int __cdecl sub_6F24(int a1, int a2) { return ((int (__cdecl *)(int, int))((char *)&loc_5FE + 2))(a1, a2); } //----- (00006F8B) -------------------------------------------------------- int __cdecl sub_6F8B(int a1, int a2) { while ( *(_BYTE *)a1 && *(_BYTE *)a1 == *(_BYTE *)a2 ) { ++a1; ++a2; } return *(_BYTE *)a1 - *(_BYTE *)a2; } //----- (00007034) -------------------------------------------------------- int __cdecl sub_7034(int a1) { char v1; // al@3 int i; // [sp+Ch] [bp-Ch]@1 for ( i = 0; ; ++i ) { v1 = *(_BYTE *)a1++ != 0; if ( !v1 ) break; } return i; } //----- (00007B34) -------------------------------------------------------- int sub_7B34() { int result; // eax@1 int v1; // [sp+20h] [bp-18h]@1 unsigned int v2; // [sp+24h] [bp-14h]@1 int v3; // [sp+28h] [bp-10h]@1 unsigned int i; // [sp+2Ch] [bp-Ch]@2 result = (*(int (__cdecl **)(_DWORD, _DWORD, _DWORD, unsigned int *, int *))(unk_0 + 168))(0, 0, 0, &v2, &v1); v3 = result; if ( result >= 0 ) { for ( i = 0; i < v2; ++i ) (*(void (__cdecl **)(_DWORD, _DWORD, _DWORD, signed int))(unk_0 + 144))(*(_DWORD *)(4 * i + v1), 0, 0, 1); (*(void (__cdecl **)(int))(unk_0 + 48))(v1); result = (*(int (**)(void))(*(_DWORD *)dword_FC74[0] + 76))(); } return result; } // FC74: using guessed type int dword_FC74[3]; //----- (00007C00) -------------------------------------------------------- int __cdecl sub_7C00(int a1, int a2, unsigned int a3) { int v3; // eax@12 unsigned int v4; // esi@17 char v5; // al@19 signed int v7; // [sp+2Ch] [bp-69Ch]@3 char v8; // [sp+30h] [bp-698h]@9 __int16 v9[512]; // [sp+230h] [bp-498h]@4 __int16 _62F[512]; // [sp+62Fh] [bp-99h]@7 char v11[128]; // [sp+630h] [bp-98h]@4 int v12; // [sp+6B0h] [bp-18h]@6 int v13; // [sp+6B4h] [bp-14h]@6 unsigned int i; // [sp+6B8h] [bp-10h]@13 __int16 *v15; // [sp+6BCh] [bp-Ch]@7 if ( a2 && a3 ) { sub_B71B((int)v11, (int)"lified Direct Access Device"); v9[0] = 0; if ( !sub_830D() && *(_WORD *)a1 != 47 ) { v12 = 128; v13 = (*(int (__cdecl **)(_DWORD, int, _DWORD, int *, _DWORD))(unk_0 + 48))( L"-number2", dword_FC3C[0], 0, &v12, v11); if ( v11[v12 - 2] != 47 ) { v15 = (__int16 *)((char *)_62F + v12); *((_BYTE *)_62F + v12) = 47; v15 = (__int16 *)((char *)v15 + 1); *(_BYTE *)v15 = 0; } if ( v11[0] != 47 ) { v12 = 512; v13 = (*(int (__cdecl **)(_DWORD, int, _DWORD, int *, char *))(unk_0 + 48))( L"serial-number3", dword_FC3C[0], 0, &v12, &v8); if ( v13 < 0 ) return v13; sub_683B((int)&v8, (int)v9, 512); } v3 = sub_B680((int)v9); sub_683B((int)v11, (int)&v9[v3], 128); } sub_BACB((int)v9, a1); for ( i = 0; ; ++i ) { v4 = i; if ( v4 >= sub_B680((int)v9) ) break; if ( v9[i] == 47 ) v9[i] = 92; } if ( sub_B8EA((int)v9) <= a3 ) { sub_B65D(a2, (int)v9); v7 = 0; } else { v5 = sub_B8EA((int)v9); sub_B563((int)L"\u6900\u6100\u6c00\u2d00\u6e00\u7500\u6d00\u6200\u6500\u7200\u3300", v5); v7 = -2147483639; } } else { v7 = -2147483646; } return v7; } // DD90: using guessed type __int16 aNumber2[9]; // DDAC: using guessed type __int16 aSerialNumber3[15]; // FC3C: using guessed type int dword_FC3C[2]; // 7C00: using guessed type char var_98[128]; // 7C00: using guessed type __int16 var_498[512]; //----- (00007E67) -------------------------------------------------------- int __cdecl sub_7E67(int a1, char a2, int a3) { int v4; // [sp+28h] [bp-B0h]@11 bool v5; // [sp+3Ch] [bp-9Ch]@13 char v6; // [sp+43h] [bp-95h]@10 __int16 v7[64]; // [sp+44h] [bp-94h]@6 int v8; // [sp+C4h] [bp-14h]@10 int i; // [sp+C8h] [bp-10h]@1 int v10; // [sp+CCh] [bp-Ch]@5 for ( i = a1 + 2 * sub_B680(a1) - 2; *(_WORD *)i && *(_WORD *)i != 92; i -= 2 ) ; i += 2; v10 = 0; while ( *(_WORD *)i && *(_WORD *)i != 46 ) { v7[v10++] = *(_WORD *)i; i += 2; } v7[v10] = 0; if ( a2 ) { v5 = 1; v8 = (*(int (__cdecl **)(_DWORD, int, _DWORD, bool *, char *))(unk_0 + 48))(v7, dword_FC3C[0], 0, &v5, &v6); if ( v8 >= 0 ) { if ( a2 == 1 ) { ++v6; } else if ( a2 == 2 ) { --v6; } v5 = v6 != 0; *(_BYTE *)a3 = v6; v8 = (*(int (__cdecl **)(_DWORD, int, signed int, bool, char *))(unk_0 + 56))(v7, dword_FC3C[0], 2, v5, &v6); v4 = v8; } else { sub_B563((int)L"\u7600\u6500\u7200\u7300\u6900\u6f00\u6e00", v8); v4 = v8; } } else { v6 = 1; v8 = (*(int (__cdecl **)(_DWORD, int, signed int, signed int, char *))(unk_0 + 56))(v7, dword_FC3C[0], 2, 1, &v6); if ( v8 >= 0 ) { *(_BYTE *)a3 = v6; v4 = 0; } else { sub_B563((int)L":%02x", v8); v4 = v8; } } return v4; } // DE3C: using guessed type __int16 a02x[6]; // DE90: using guessed type __int16 aMcVersion[11]; // FC3C: using guessed type int dword_FC3C[2]; // 7E67: using guessed type __int16 var_94[64]; //----- (000080C5) -------------------------------------------------------- signed int __cdecl sub_80C5(int a1, int a2) { signed int v3; // [sp+1Ch] [bp-41Ch]@12 __int16 v4[512]; // [sp+28h] [bp-410h]@1 int v5; // [sp+428h] [bp-10h]@1 int v6; // [sp+42Ch] [bp-Ch]@4 v4[0] = 0; v5 = 0; while ( (*(_BYTE *)a1 & 0x7F) != 127 || *(_BYTE *)(a1 + 1) != -1 ) { if ( (*(_BYTE *)a1 & 0x7F) == 4 && *(_BYTE *)(a1 + 1) == 4 ) { v6 = a1; if ( !a2 ) { *(_BYTE *)a1 = 127; *(_BYTE *)(a1 + 1) = -1; *(_BYTE *)(a1 + 2) = 4; *(_BYTE *)(a1 + 3) = 0; return 0; } if ( v5 ) { if ( v4[v5] != 92 && v4[v5] != 47 ) sub_BACB((int)v4, (int)L"vision"); sub_BACB((int)v4, v6 + 4); } else { sub_BACB((int)v4, v6 + 4); } v5 = sub_B680((int)v4); } a1 += *(_BYTE *)(a1 + 2) | (*(_BYTE *)(a1 + 3) << 8); } if ( v5 ) { sub_B65D(a2, (int)v4); v3 = 0; } else { v3 = -2147483634; } return v3; } // DF38: using guessed type __int16 aVision[7]; // 80C5: using guessed type __int16 var_410[512]; //----- (00008252) -------------------------------------------------------- signed int __cdecl sub_8252(int a1) { signed int v2; // [sp+2Ch] [bp-41Ch]@2 int v3; // [sp+38h] [bp-410h]@1 char v4; // [sp+3Ch] [bp-40Ch]@1 int v5; // [sp+43Ch] [bp-Ch]@1 v3 = 512; v5 = (*(int (__cdecl **)(__int16 *, int, _DWORD, int *, char *))(unk_0 + 48))( L"\u6900\u7300\u6900\u6f00\u6e00", dword_FC3C[0], 0, &v3, &v4); if ( v5 ) { v2 = v5; } else { *(_DWORD *)a1 = sub_A90D(v3, (int)&v4); if ( *(_DWORD *)a1 ) v2 = 0; else v2 = -2147483639; } return v2; } // DF38: using guessed type __int16 aVision[7]; // FC3C: using guessed type int dword_FC3C[2]; //----- (0000830D) -------------------------------------------------------- // write access to const memory has been detected, the output may be wrong! signed int sub_830D() { signed int v1; // [sp+1Ch] [bp-1Ch]@2 int v2; // [sp+28h] [bp-10h]@3 int i; // [sp+2Ch] [bp-Ch]@5 if ( LOBYTE(dword_EFD0[0]) ) { v1 = 1; } else if ( sub_8252((int)&v2) ) { v1 = 0; } else { for ( i = v2; (*(_BYTE *)i & 0x7F) != 127 || *(_BYTE *)(i + 1) != -1; i += *(_BYTE *)(i + 2) | (*(_BYTE *)(i + 3) << 8) ) { if ( (*(_BYTE *)i & 0x7F) == 3 && (*(_BYTE *)(i + 1) == 11 || *(_BYTE *)(i + 1) == 12) ) { LOBYTE(dword_EFD0[0]) = 1; break; } } (*(void (__cdecl **)(int))(unk_0 + 48))(v2); v1 = LOBYTE(dword_EFD0[0]); } return v1; } // 8383: write access to const memory at EFD0 has been detected // EFD0: using guessed type int dword_EFD0[12]; //----- (0000849A) -------------------------------------------------------- signed int __cdecl sub_849A(int a1, int a2, int a3, char a4) { signed int v5; // [sp+28h] [bp-440h]@4 int v6; // [sp+34h] [bp-434h]@20 char v7; // [sp+3Bh] [bp-42Dh]@15 int v8; // [sp+3Ch] [bp-42Ch]@7 int v9; // [sp+40h] [bp-428h]@1 unsigned int v10; // [sp+44h] [bp-424h]@1 char v11; // [sp+48h] [bp-420h]@3 int v12; // [sp+448h] [bp-20h]@24 int v13; // [sp+44Ch] [bp-1Ch]@24 int v14; // [sp+450h] [bp-18h]@3 int v15; // [sp+454h] [bp-14h]@20 int v16; // [sp+458h] [bp-10h]@22 unsigned int i; // [sp+45Ch] [bp-Ch]@6 v10 = 0; v9 = 0; if ( a3 ) *(_DWORD *)a3 = 0; v14 = sub_7C00(a2, (int)&v11, 0x200u); if ( v14 >= 0 ) { v14 = (*(int (__cdecl **)(signed int, int, _DWORD, unsigned int *, int *))(unk_0 + 168))( 2, dword_FC44[0], 0, &v10, &v9); if ( v14 >= 0 ) { for ( i = 0; i < v10; ++i ) { v14 = (*(int (__cdecl **)(_DWORD, int, int *))(unk_0 + 88))(*(_DWORD *)(4 * i + v9), dword_FC44[0], &v8); if ( *(_DWORD *)(v8 + 16) && (**(_BYTE **)(v8 + 16) != 4 || *(_BYTE *)(*(_DWORD *)(v8 + 16) + 1) != 6) ) { if ( v14 >= 0 ) { if ( !sub_B694((unsigned __int16 *)&v11, *(_DWORD *)(v8 + 16) + 4) ) { if ( a3 ) *(_DWORD *)a3 = *(_DWORD *)(4 * i + v9); v14 = sub_7E67((int)&v11, 1, (int)&v7); if ( v14 >= 0 ) { (*(void (__cdecl **)(int))(unk_0 + 48))(v9); return -2147483628; } } } else { sub_B563( (int)L"\u6200\u7200\u6900\u6400\u6700\u6500\u2d00\u6400\u6500\u7600\u6900\u6300\u6500\u2d00\u6900\u6400", v14); } } } (*(void (__cdecl **)(int))(unk_0 + 48))(v9); } v15 = sub_A1CB(0, (int)&v11); v14 = sub_8252((int)&v6); if ( v14 ) { v5 = v14; } else { v16 = sub_9F6C(v6, v15); v14 = (*(int (__cdecl **)(_DWORD, int, int, _DWORD))(unk_0 + 112))(0, a1, v16, 0); (*(void (__cdecl **)(int))(unk_0 + 48))(v6); (*(void (__cdecl **)(int))(unk_0 + 48))(v16); if ( v14 ) { v5 = v14; } else { v14 = (*(int (__cdecl **)(int, int, int *))(unk_0 + 88))(v12, dword_FC44[0], &v13); if ( *(_DWORD *)(v13 + 16) ) { if ( *(_DWORD *)(v13 + 48) == 3 || *(_DWORD *)(v13 + 48) == 5 ) { if ( *(_DWORD *)(v13 + 16) ) { if ( sub_B694((unsigned __int16 *)(*(_DWORD *)(v13 + 16) + 4), (int)&v11) ) { (*(void (__cdecl **)(_DWORD))(unk_0 + 48))(*(_DWORD *)(v13 + 16)); *(_DWORD *)(v13 + 16) = v15; } else { (*(void (__cdecl **)(int))(unk_0 + 48))(v15); } } v14 = (*(int (__cdecl **)(int, _DWORD, _DWORD))(unk_0 + 116))(v12, 0, 0); if ( v14 ) { sub_B563((int)L"ults", v14); } else { if ( a3 ) *(_DWORD *)a3 = v12; v14 = sub_7E67((int)&v11, 0, (int)&v7); if ( v14 < 0 ) return v14; if ( a4 ) sub_7B34(); } return v14; } sub_B563((int)L"revision", *(_DWORD *)(v13 + 48)); v5 = -2147483646; } else { sub_5FAF(1952673887, 1480938066, 0, (int)"cess Device", 0); v5 = -2147483646; } } } } else { v5 = v14; } return v5; } // DF50: using guessed type __int16 aHbridgeDeviceI[18]; // DF8C: using guessed type __int16 aRevision[9]; // DFC0: using guessed type __int16 aUlts[5]; // FC44: using guessed type int dword_FC44[2]; //----- (00008AD4) -------------------------------------------------------- signed int __cdecl sub_8AD4(int a1, int a2, int a3) { signed int v4; // [sp+2Ch] [bp-3Ch]@7 int v5; // [sp+34h] [bp-34h]@2 int v6; // [sp+38h] [bp-30h]@2 int v7; // [sp+3Ch] [bp-2Ch]@2 int v8; // [sp+40h] [bp-28h]@2 unsigned int v9; // [sp+44h] [bp-24h]@1 char v10; // [sp+4Ah] [bp-1Eh]@2 int v11; // [sp+4Ch] [bp-1Ch]@1 int v12; // [sp+50h] [bp-18h]@2 unsigned int v13; // [sp+54h] [bp-14h]@1 int v14; // [sp+58h] [bp-10h]@2 unsigned int i; // [sp+5Ch] [bp-Ch]@1 v9 = 0; v11 = (*(int (__cdecl **)(signed int, _DWORD, _DWORD, unsigned int *, int *))(unk_0 + 168))(2, 0, 0, &v9, &a2); v13 = 999; for ( i = 0; i < v9; ++i ) { v11 = (*(int (__cdecl **)(_DWORD, _DWORD, int))(unk_0 + 88))(*(_DWORD *)(4 * i + a2), 0, a3); v12 = *(_DWORD *)a3; v11 = (*(int (__cdecl **)(int, int *, int *, int *, int *))(v12 + 56))(v12, &v8, &v7, &v6, &v5); v14 = (v6 << 8) | (v7 << 16) | (v8 << 24) | v5; v11 = (*(int (__cdecl **)(int, signed int, signed int, signed int, char *))(v12 + 24))(v12, 1, 2, 1, &v10); if ( v14 == a1 ) { v13 = i; break; } } if ( v13 == 999 ) { v4 = -2147483645; } else { v11 = (*(int (__cdecl **)(_DWORD, _DWORD, int))(unk_0 + 88))(*(_DWORD *)(4 * v13 + a2), 0, a3); v12 = *(_DWORD *)a3; if ( a2 ) (*(void (__cdecl **)(int))(unk_0 + 48))(a2); v4 = 0; } return v4; } //----- (00008CBD) -------------------------------------------------------- int __cdecl sub_8CBD(int a1, unsigned __int8 a2) { unsigned __int8 v3; // [sp+3Bh] [bp-Dh]@1 (*(void (__cdecl **)(int, _DWORD, _DWORD, signed int, unsigned __int8 *))(a1 + 24))(a1, 0, a2, 1, &v3); return v3; } //----- (00008D02) -------------------------------------------------------- int __cdecl sub_8D02(int a1, unsigned __int8 a2) { unsigned __int16 v3; // [sp+3Ah] [bp-Eh]@1 (*(void (__cdecl **)(int, signed int, _DWORD, signed int, unsigned __int16 *))(a1 + 24))(a1, 1, a2, 1, &v3); return v3; } //----- (000092D9) -------------------------------------------------------- void __usercall sub_92D9(int a1@<ebp>) { char v1; // ST08_1@1 int v2; // edx@14 char v3; // [sp+4h] [bp-64h]@1 *(_WORD *)(a1 - 16) = sub_8D02(*(_DWORD *)(a1 + 8), 0); *(_WORD *)(a1 - 14) = sub_8D02(*(_DWORD *)(a1 + 8), 2u); *(_BYTE *)(a1 - 11) = sub_8CBD(*(_DWORD *)(a1 + 8), 0xAu); *(_BYTE *)(a1 - 10) = sub_8CBD(*(_DWORD *)(a1 + 8), 0xBu); *(_BYTE *)(a1 - 9) = sub_8CBD(*(_DWORD *)(a1 + 8), 9u); sub_B563((int)L"\u4200\u5f00\u5300\u6500\u7400\u4500\u5300\u5400", v1); *(_DWORD *)(a1 - 76) = *(_WORD *)(a1 - 16); if ( *(_DWORD *)(a1 - 76) == 5348 ) { sub_B563((int)&unk_E01C, v3); } else if ( *(_DWORD *)(a1 - 76) > 5348 ) { if ( *(_DWORD *)(a1 - 76) == 5772 ) { sub_B563((int)&aSetmlbreplaced[7], v3); } else { if ( *(_DWORD *)(a1 - 76) != 32902 ) goto LABEL_12; sub_B563((int)&aGetrtcramsize[7], v3); } } else { if ( *(_DWORD *)(a1 - 76) != 4523 ) { LABEL_12: sub_B563((int)&unk_E06C, *(_WORD *)(a1 - 16)); goto LABEL_13; } sub_B563((int)((char *)&dword_E045 + 1), v3); } LABEL_13: sub_B563((int)L"\u2000\u2000", *(_WORD *)(a1 - 14)); *(_DWORD *)(a1 - 72) = *(_BYTE *)(a1 - 10); v2 = *(_DWORD *)(a1 - 72); JUMPOUT(*(_DWORD *)algn_9429); } // E008: using guessed type __int16 aLb_setest[10]; // E024: using guessed type __int16 aSetmlbreplaced[15]; // E045: using guessed type int dword_E045; // E04C: using guessed type __int16 aGetrtcramsize[14]; // E0BC: using guessed type __int16[4]; //----- (00009DAC) -------------------------------------------------------- int __cdecl sub_9DAC(int a1) { int result; // eax@1 int v2; // ecx@1 result = 0; v2 = a1; if ( a1 ) { while ( (*(_BYTE *)v2 & 0x7F) != 127 || *(_BYTE *)(v2 + 1) != -1 ) v2 += (*(_BYTE *)(v2 + 3) << 8) | *(_BYTE *)(v2 + 2); result = v2 - a1 + 4; } return result; } //----- (00009E8A) -------------------------------------------------------- int __cdecl sub_9E8A(int a1) { int v1; // ecx@1 int v2; // ecx@6 int result; // eax@7 v1 = a1; if ( !a1 ) goto LABEL_11; while ( (*(_BYTE *)v1 & 0x7F) != 127 || *(_BYTE *)(v1 + 1) != -1 ) v1 += (*(_BYTE *)(v1 + 3) << 8) | *(_BYTE *)(v1 + 2); v2 = v1 - a1; if ( v2 != -4 ) result = sub_A8A4(v2 + 4, a1); else LABEL_11: result = 0; return result; } //----- (00009F6C) -------------------------------------------------------- int __cdecl sub_9F6C(int a1, int a2) { int v2; // ecx@3 int i; // ecx@8 int v5; // edi@12 int v6; // esi@12 int v7; // [sp+1Ch] [bp-1Ch]@8 if ( !a1 ) { a1 = a2; return sub_9E8A(a1); } v2 = a1; if ( !a2 ) return sub_9E8A(a1); while ( (*(_BYTE *)v2 & 0x7F) != 127 || *(_BYTE *)(v2 + 1) != -1 ) v2 += (*(_BYTE *)(v2 + 3) << 8) | *(_BYTE *)(v2 + 2); v7 = v2 - a1 + 4; for ( i = a2; (*(_BYTE *)i & 0x7F) != 127 || *(_BYTE *)(i + 1) != -1; i += (*(_BYTE *)(i + 3) << 8) | *(_BYTE *)(i + 2) ) ; v5 = i - a2 + 4; v6 = sub_A8A4(v5 + v7 - 4, a1); if ( v6 ) (*(void (__cdecl **)(int, int, int))(unk_0 + 188))(v6 + v7 - 4, a2, v5); return v6; } //----- (0000A03E) -------------------------------------------------------- int __cdecl sub_A03E(int a1, int a2) { int v2; // edi@1 int v3; // eax@1 int v4; // esi@1 int v5; // edx@2 v2 = 0; v3 = sub_A8A4(((*(_BYTE *)(a2 + 3) << 8) | *(_BYTE *)(a2 + 2)) + 4, a2); v4 = v3; if ( v3 ) { v5 = v3 + ((*(_BYTE *)(v3 + 3) << 8) | *(_BYTE *)(v3 + 2)); *(_BYTE *)v5 = 127; *(_BYTE *)(v5 + 1) = -1; *(_BYTE *)(v5 + 2) = 4; *(_BYTE *)(v5 + 3) = 0; v2 = sub_9F6C(a1, v3); (*(void (__cdecl **)(int))(unk_0 + 48))(v4); } return v2; } //----- (0000A1CB) -------------------------------------------------------- int __cdecl sub_A1CB(int a1, int a2) { int v2; // esi@1 int v3; // eax@4 int v4; // edi@4 int v5; // edx@5 int v7; // [sp+1Ch] [bp-2Ch]@4 int v8; // [sp+2Ch] [bp-1Ch]@6 signed int v9; // [sp+38h] [bp-10h]@1 v2 = 0; v9 = 41432; while ( *(_WORD *)(a2 + v2) ) v2 += 2; v3 = sub_AA03(v2 + 10); v7 = 0; v4 = v3; if ( v3 ) { *(_BYTE *)v3 = 4; *(_BYTE *)(v3 + 1) = 4; *(_BYTE *)(v3 + 2) = v2 + 6; *(_BYTE *)(v3 + 3) = (unsigned __int16)(v2 + 6) >> 8; (*(void (__cdecl **)(int, int, int))(unk_0 + 188))(v3 + 4, a2, v2 + 2); v5 = v4 + ((*(_BYTE *)(v4 + 3) << 8) | *(_BYTE *)(v4 + 2)); *(_BYTE *)v5 = 127; *(_BYTE *)(v5 + 1) = -1; *(_BYTE *)(v5 + 2) = 4; *(_BYTE *)(v5 + 3) = 0; v7 = v4; if ( a1 ) { v8 = 0; (*(void (__cdecl **)(int, _DWORD, int *))(unk_0 + 88))(a1, 0, &v8); v7 = sub_9F6C(v8, v4); (*(void (__cdecl **)(int))(unk_0 + 48))(v4); } } return v7; } //----- (0000A2BD) -------------------------------------------------------- // write access to const memory has been detected, the output may be wrong! int __cdecl sub_A2BD(int a1, int a2) { unk_0 = a2; unk_0 = *(_DWORD *)(a2 + 60); unk_0 = *(_DWORD *)(a2 + 56); return 0; } // A2D0: write access to const memory at 0 has been detected // A2DB: write access to const memory at 0 has been detected // A2E6: write access to const memory at 0 has been detected //----- (0000A539) -------------------------------------------------------- signed int __cdecl sub_A539(int a1, int a2, int a3, int a4) { int v4; // ecx@1 int v5; // edi@1 signed int v6; // esi@1 signed int v7; // edx@4 signed int v8; // edx@11 v4 = a2; v5 = a3; v6 = -2147483646; if ( a4 != 0 && a1 != 0 ) { if ( a3 != 0 && a2 != 0 ) { LABEL_9: if ( *(_BYTE *)v4 ) { v7 = 1; do { if ( *(_BYTE *)(a1 + v7 - 1) != *(_BYTE *)(v4 + v7 - 1) ) { v4 += 3; goto LABEL_9; } ++v7; } while ( v7 != 4 ); while ( *(_DWORD *)v5 ) { v8 = 1; while ( *(_BYTE *)(a1 + v8 - 1) == *(_BYTE *)(*(_DWORD *)v5 + v8 - 1) ) { ++v8; if ( v8 == 4 ) { v6 = 0; *(_DWORD *)a4 = *(_DWORD *)(v5 + 4); return v6; } } v5 += 8; } } } v6 = -2147483645; } return v6; } //----- (0000A5CB) -------------------------------------------------------- int __cdecl sub_A5CB(int a1, int a2, int a3, int a4) { sub_A2BD(a1, a2); *(_DWORD *)(a3 + 16) = a1; *(_DWORD *)(a3 + 20) = a4; return (*(int (__cdecl **)(int, _DWORD, _DWORD, int))(unk_0 + 76))(a3 + 20, 0, 0, a3); } //----- (0000A634) -------------------------------------------------------- int __cdecl sub_A634(int a1, int a2, int a3, int a4, int a5, int a6, int a7) { int result; // eax@1 result = sub_A5CB(a1, a2, a3, a4); if ( result >= 0 ) { if ( !a5 || (result = (*(int (__cdecl **)(int, _DWORD, _DWORD, int))(unk_0 + 76))(a3 + 20, 0, 0, a5), result >= 0) ) { if ( !a6 || (result = (*(int (__cdecl **)(int, _DWORD, _DWORD, int))(unk_0 + 76))(a3 + 20, 0, 0, a6), result >= 0) ) { if ( !a7 || (result = (*(int (__cdecl **)(int, _DWORD, _DWORD, int))(unk_0 + 76))(a3 + 20, 0, 0, a7), result >= 0) ) result = 0; } } } return result; } //----- (0000A82A) -------------------------------------------------------- int __cdecl sub_A82A(int a1) { int v2; // [sp+1Ch] [bp-Ch]@1 v2 = 0; (*(void (__cdecl **)(signed int, int, int *))(unk_0 + 44))(4, a1, &v2); return v2; } //----- (0000A8A4) -------------------------------------------------------- int __cdecl sub_A8A4(int a1, int a2) { int v2; // ecx@1 int v4; // [sp+1Ch] [bp-1Ch]@1 v4 = 0; (*(void (__cdecl **)(signed int, int, int *))(unk_0 + 44))(4, a1, &v4); v2 = v4; if ( v4 ) { (*(void (__cdecl **)(int, int, int))(unk_0 + 188))(v4, a2, a1); v2 = v4; } return v2; } //----- (0000A90D) -------------------------------------------------------- int __cdecl sub_A90D(int a1, int a2) { int v2; // ecx@1 int v4; // [sp+1Ch] [bp-1Ch]@1 v4 = 0; (*(void (__cdecl **)(signed int, int, int *))(unk_0 + 44))(6, a1, &v4); v2 = v4; if ( v4 ) { (*(void (__cdecl **)(int, int, int))(unk_0 + 188))(v4, a2, a1); v2 = v4; } return v2; } //----- (0000AA03) -------------------------------------------------------- int __cdecl sub_AA03(int a1) { int v1; // esi@1 int v3; // [sp+1Ch] [bp-1Ch]@1 v3 = 0; (*(void (__cdecl **)(signed int, int, int *))(unk_0 + 44))(4, a1, &v3); v1 = v3; if ( v3 ) (*(void (__cdecl **)(int, int, _DWORD))(unk_0 + 192))(v3, a1, 0); return v1; } //----- (0000AA70) -------------------------------------------------------- int __cdecl sub_AA70(int a1, unsigned int a2, int a3, unsigned int *a4) { int v4; // edi@1 int v5; // esi@1 __int16 v6; // dx@5 int v7; // edx@8 unsigned int *v8; // edx@14 unsigned int *v9; // edx@23 unsigned int v10; // eax@23 unsigned int v11; // edx@23 unsigned int *v12; // edx@24 int v13; // ecx@25 int v14; // esi@25 char *i; // edx@25 unsigned int *v16; // edx@31 int v17; // eax@31 int v18; // edx@31 int *v19; // edx@32 int v20; // eax@33 char *j; // edx@33 unsigned int *v22; // eax@38 unsigned int v23; // eax@38 char v24; // zf@38 unsigned int v25; // eax@38 int v26; // esi@40 int v27; // edx@40 int v28; // eax@43 unsigned int *v29; // eax@50 char *v30; // eax@50 char *v31; // eax@50 int v32; // esi@52 int v33; // edx@52 int v34; // eax@55 unsigned int *v35; // eax@62 unsigned int v36; // ecx@62 unsigned int *v37; // edx@63 unsigned int v38; // edx@63 int v39; // ST34_4@64 int v40; // ST30_4@64 int v41; // ST2C_4@64 int v42; // ST28_4@64 int v43; // ST24_4@64 int v44; // ST20_4@64 int v45; // ST1C_4@64 int v46; // ST18_4@64 int v47; // ST14_4@64 int v48; // ST10_4@64 int v49; // ST04_4@64 unsigned int v50; // esi@64 int v51; // eax@64 unsigned int *v52; // edx@65 unsigned int v53; // edx@65 int v54; // ST1C_4@65 int v55; // ST18_4@65 int v56; // ST14_4@65 int v57; // ST10_4@65 unsigned int *v58; // edx@66 unsigned int v59; // eax@66 char *v60; // edx@66 unsigned int v62; // [sp+5Ch] [bp-8Ch]@7 __int16 v63; // [sp+72h] [bp-76h]@42 int v64; // [sp+74h] [bp-74h]@106 char v65; // [sp+7Bh] [bp-6Dh]@54 char *v66; // [sp+7Ch] [bp-6Ch]@50 unsigned int v67; // [sp+80h] [bp-68h]@38 unsigned int v68; // [sp+84h] [bp-64h]@7 unsigned int v69; // [sp+88h] [bp-60h]@1 unsigned int v70; // [sp+8Ch] [bp-5Ch]@1 char v71; // [sp+94h] [bp-54h]@25 signed int v72; // [sp+D8h] [bp-10h]@1 v72 = 43643; v4 = a3; v5 = a2; v70 = 0; v69 = a2 >> 1; while ( 1 ) { v6 = *(_WORD *)v4; if ( !*(_WORD *)v4 ) break; v64 = v69 - 1; if ( v70 >= v69 - 1 ) break; if ( v6 == 37 ) { v62 = 0; v68 = 0; while ( 2 ) { v4 += 2; v7 = *(_WORD *)v4; switch ( v7 ) { case 45: v62 |= 1u; continue; case 43: v62 |= 2u; continue; case 32: v62 |= 4u; continue; case 44: v62 |= 8u; continue; case 76: case 108: v62 |= 0x10u; continue; case 42: v8 = a4; ++a4; v68 = *v8; continue; case 48: v62 |= 0x20u; goto LABEL_16; case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: LABEL_16: v68 = 0; while ( 1 ) { v4 += 2; v68 = v7 + 10 * v68 - 48; LOWORD(v7) = *(_WORD *)v4; if ( (unsigned __int16)(*(_WORD *)v4 - 48) > 9u ) break; v7 = (unsigned __int16)v7; } v4 -= 2; continue; default: switch ( *(_WORD *)v4 ) { case 0x58: LOBYTE(v62) = v62 | 0x20; v68 = 16; goto LABEL_22; case 0x78: LABEL_22: if ( v62 & 0x10 ) { v9 = a4; a4 += 2; v10 = *v9; v11 = v9[1]; } else { v12 = a4; ++a4; v10 = *v12; v11 = 0; } sub_BC21((int)&v71, v10, v11, v62, v68); v13 = v70; v14 = a1 + 2 * v70; for ( i = &v71; *(_WORD *)i; i += 2 ) { v14 += 2; if ( v13 == v64 ) break; *(_WORD *)(v14 - 2) = *(_WORD *)i; ++v13; } goto LABEL_103; case 0x64: if ( v62 & 0x10 ) { v16 = a4; a4 += 2; v17 = *v16; v18 = v16[1]; } else { v19 = (int *)a4; ++a4; v17 = *v19; v18 = 0; } sub_BCF9((int)&v71, v17, v18, v62, v68); v20 = a1 + 2 * v70; v13 = v70; for ( j = &v71; *(_WORD *)j; j += 2 ) { v20 += 2; if ( v13 == v64 ) break; *(_WORD *)(v20 - 2) = *(_WORD *)j; ++v13; } goto LABEL_103; case 0x53: case 0x73: v22 = a4; ++a4; v23 = *v22; v67 = v23; v24 = v23 == 0; v25 = (unsigned int)L"oller\n"; if ( !v24 ) v25 = v67; v26 = a1 + 2 * v70; v27 = 0; while ( 1 ) { v13 = v27 + v70; v63 = *(_WORD *)(v25 + 2 * v27); if ( !*(_WORD *)(v25 + 2 * v27) ) break; v26 += 2; if ( v27 == v64 - v70 ) break; ++v27; *(_WORD *)(v26 - 2) = v63; } v28 = a1 + 2 * v13; while ( v27 < v68 ) { v28 += 2; if ( v64 <= (unsigned int)v13 ) break; *(_WORD *)(v28 - 2) = 32; ++v13; ++v27; } goto LABEL_103; case 0x61: v29 = a4; ++a4; v30 = (char *)*v29; v66 = v30; v24 = v30 == 0; v31 = "/No Device"; if ( !v24 ) v31 = v66; v32 = a1 + 2 * v70; v33 = 0; while ( 1 ) { v13 = v33 + v70; v65 = v31[v33]; if ( !v31[v33] ) break; v32 += 2; if ( v33 == v64 - v70 ) break; ++v33; *(_WORD *)(v32 - 2) = (unsigned __int8)v65; } v34 = a1 + 2 * v13; while ( v33 < v68 ) { v34 += 2; if ( v64 <= (unsigned int)v13 ) break; *(_WORD *)(v34 - 2) = 32; ++v13; ++v33; } goto LABEL_103; case 0x63: v35 = a4; ++a4; *(_WORD *)(a1 + 2 * v70) = *v35; v36 = v70; break; case 0x67: v37 = a4; v13 = v70; ++a4; v38 = *v37; if ( !v38 ) goto LABEL_103; v39 = *(_BYTE *)(v38 + 15); v40 = *(_BYTE *)(v38 + 14); v41 = *(_BYTE *)(v38 + 13); v42 = *(_BYTE *)(v38 + 12); v43 = *(_BYTE *)(v38 + 11); v44 = *(_BYTE *)(v38 + 10); v45 = *(_BYTE *)(v38 + 9); v46 = *(_BYTE *)(v38 + 8); v47 = *(_WORD *)(v38 + 6); v48 = *(_WORD *)(v38 + 4); v49 = v5; v50 = v70; v51 = sub_B3BF(a1 + 2 * v70, v49, (int)L"ogrammable Interrupt Controller\n", *(_DWORD *)v38); goto LABEL_99; case 0x74: v52 = a4; ++a4; v53 = *v52; v54 = *(_BYTE *)(v53 + 5); v55 = *(_BYTE *)(v53 + 4); v56 = *(_WORD *)v53; v57 = *(_BYTE *)(v53 + 3); v13 = sub_B3BF( a1 + 2 * v70, v5, (int)L"\u7200\u6f00\u6700\u7200\u6100\u6d00\u6d00\u6100\u6200\u6c00\u6500\u2000\u4900\u6e00\u7400\u6500\u7200\u7200\u7500\u7000\u7400\u2000\u4300\u6f00\u6e00\u7400\u7200\u6f00\u6c00\u6c00\u6500\u7200\u0a00", *(_BYTE *)(v53 + 2)) + v70 - 1; goto LABEL_103; case 0x72: v58 = a4; ++a4; v59 = *v58; v60 = byte_CB71; if ( !v59 ) goto LABEL_96; v60 = byte_CB79; if ( v59 == -2147483647 ) goto LABEL_96; v60 = (char *)dword_CB84; if ( v59 == -2147483646 ) goto LABEL_96; v60 = " number: %s (size: %d)\n"; if ( v59 == -2147483645 ) goto LABEL_96; v60 = "(size: %d)\n"; if ( v59 == -2147483644 ) goto LABEL_96; v60 = "lid char %c\n"; if ( v59 == -2147483643 ) goto LABEL_96; v60 = "alid checksum: %d (modulo 34 is %d)\n"; if ( v59 == -2147483642 ) goto LABEL_96; v60 = "sum: %d (modulo 34 is %d)\n"; if ( v59 == -2147483641 ) goto LABEL_96; v60 = "ulo 34 is %d)\n"; if ( v59 == -2147483640 ) goto LABEL_96; v60 = "nvalid size %d\n"; if ( v59 == -2147483639 ) goto LABEL_96; v60 = &byte_CBFB; if ( v59 == -2147483638 ) goto LABEL_96; v60 = " number: all letters have the same char (%c)\n"; if ( v59 == -2147483637 ) goto LABEL_96; v60 = " letters have the same char (%c)\n"; if ( v59 == -2147483636 ) goto LABEL_96; v60 = "have the same char (%c)\n"; if ( v59 == -2147483635 ) goto LABEL_96; v60 = "char (%c)\n"; if ( v59 == -2147483634 ) goto LABEL_96; v60 = ""; if ( v59 == -2147483633 ) goto LABEL_96; v60 = "000000"; if ( v59 == -2147483632 ) goto LABEL_96; v60 = "%02d_%02d-%02d_%02d_%02d"; if ( v59 == -2147483631 ) goto LABEL_96; v60 = "02d_%02d_%02d"; if ( v59 == -2147483630 ) goto LABEL_96; v60 = "%02d"; if ( v59 == -2147483629 ) goto LABEL_96; v60 = "d%02d%02d%02d%02d"; if ( v59 == -2147483628 ) goto LABEL_96; v60 = "d"; if ( v59 == -2147483627 ) goto LABEL_96; v60 = " unload driver it has an invalid FilePath\n"; if ( v59 == -2147483626 ) goto LABEL_96; v60 = "ver it has an invalid FilePath\n"; if ( v59 == -2147483625 ) goto LABEL_96; v60 = "an invalid FilePath\n"; if ( v59 == -2147483624 ) goto LABEL_96; v60 = "Path\n"; if ( v59 == 1 ) goto LABEL_96; v60 = (char *)dword_CCC4; if ( v59 == 2 ) goto LABEL_96; v60 = (char *)&unk_CCDB; if ( v59 == 3 ) goto LABEL_96; if ( v59 == 4 ) { v60 = "iver it has an invalid FilePath\n"; LABEL_96: v51 = sub_B3BF(a1 + 2 * v70, v5, (int)L"neric 8237 DMA controller\n", (char)v60); } else { v51 = sub_B3BF(a1 + 2 * v70, v5, (int)&aNeric8237DmaCo[3], v59); } v50 = v70; LABEL_99: v13 = v51 + v50 - 1; goto LABEL_103; case 0x25: v36 = v70; *(_WORD *)(a1 + 2 * v70) = 37; break; default: *(_WORD *)(a1 + 2 * v70) = *(_WORD *)v4; v36 = v70; break; } v13 = v36 + 1; LABEL_103: v70 = v13; v5 = a2 - 2 * v13; break; } break; } } else { if ( v6 == 10 && v70 < v69 - 2 ) { v5 -= 2; *(_WORD *)(a1 + 2 * v70++) = 13; v6 = *(_WORD *)v4; } v5 -= 2; *(_WORD *)(a1 + 2 * v70++) = v6; } v4 += 2; } *(_WORD *)(a1 + 2 * v70) = 0; return (signed int)(2 * v70 + 2) >> 1; } // CB84: using guessed type int dword_CB84[4]; // CBFB: using guessed type char byte_CBFB; // CCC4: using guessed type int dword_CCC4[5]; // EA88: using guessed type __int16 aOller[7]; // EAA4: using guessed type __int16 aOgrammableInte[33]; // EAEC: using guessed type __int16 aSaProgrammable[38]; // EB3C: using guessed type __int16 aNeric8237DmaCo[27]; //----- (0000B3BF) -------------------------------------------------------- int __cdecl sub_B3BF(int a1, int a2, int a3, char a4) { return sub_AA70(a1, a2, a3, (unsigned int *)&a4); } //----- (0000B563) -------------------------------------------------------- int __cdecl sub_B563(int a1, char a2) { int v2; // esi@1 int v3; // eax@1 char v5; // [sp+1Ch] [bp-29Ch]@1 char *v6; // [sp+29Ch] [bp-1Ch]@1 v6 = &a2; v2 = sub_AA70((int)&v5, 0x280u, a1, (unsigned int *)&a2); v3 = *(_DWORD *)(unk_0 + 44); if ( v3 ) (*(void (__cdecl **)(int, char *))(v3 + 4))(v3, &v5); return v2; } //----- (0000B631) -------------------------------------------------------- signed int __cdecl sub_B631(int a1, int a2) { signed int v2; // edx@1 v2 = 1; do { if ( *(_BYTE *)(a1 + v2 - 1) != *(_BYTE *)(a2 + v2 - 1) ) return 0; ++v2; } while ( v2 != 17 ); return 1; } //----- (0000B65D) -------------------------------------------------------- int __cdecl sub_B65D(int a1, int a2) { int v2; // ecx@1 int v3; // edx@1 int result; // eax@3 v2 = a1; v3 = a2; while ( 1 ) { result = *(_WORD *)v3; if ( !(_WORD)result ) break; *(_WORD *)v2 = result; v3 += 2; v2 += 2; } *(_WORD *)v2 = 0; return result; } //----- (0000B680) -------------------------------------------------------- int __cdecl sub_B680(int a1) { int result; // eax@1 for ( result = 0; *(_WORD *)(a1 + 2 * result); ++result ) ; return result; } //----- (0000B694) -------------------------------------------------------- int __cdecl sub_B694(unsigned __int16 *a1, int a2) { unsigned __int16 *v2; // edx@1 int i; // ecx@1 unsigned __int16 v4; // ax@4 v2 = a1; for ( i = a2; ; i += 2 ) { v4 = *v2; if ( !*v2 || v4 != *(_WORD *)i ) break; ++v2; } return v4 - *(_WORD *)i; } //----- (0000B708) -------------------------------------------------------- int __cdecl sub_B708(int a1) { int result; // eax@1 for ( result = 0; *(_BYTE *)(result + a1); ++result ) ; return result; } //----- (0000B71B) -------------------------------------------------------- int __cdecl sub_B71B(int a1, int a2) { int v2; // eax@1 int i; // ecx@1 v2 = a1; for ( i = a2; *(_BYTE *)i; *(_BYTE *)v2++ = *(_BYTE *)i++ ) ; *(_BYTE *)v2 = 0; return v2 + 1; } //----- (0000B8EA) -------------------------------------------------------- int __cdecl sub_B8EA(int a1) { int i; // eax@1 for ( i = 0; *(_WORD *)(a1 + 2 * i); ++i ) ; return 2 * i + 2; } //----- (0000BACB) -------------------------------------------------------- int __cdecl sub_BACB(int a1, int a2) { int v2; // eax@1 int v3; // ecx@1 int i; // edx@4 int result; // eax@6 v2 = 0; v3 = a2; while ( *(_WORD *)(a1 + 2 * v2) ) ++v2; for ( i = a1 + 2 * v2; ; i += 2 ) { result = *(_WORD *)v3; if ( !(_WORD)result ) break; *(_WORD *)i = result; v3 += 2; } *(_WORD *)i = 0; return result; } //----- (0000BC21) -------------------------------------------------------- int __cdecl sub_BC21(int a1, unsigned int a2, unsigned int a3, char a4, unsigned int a5) { signed int v5; // eax@1 unsigned int v6; // edx@1 unsigned int v7; // esi@3 unsigned int v8; // ecx@3 unsigned __int64 v9; // rax@4 unsigned __int64 v10; // kr08_8@4 char *v11; // ecx@5 unsigned int v12; // eax@5 signed int v13; // edx@5 int v14; // edx@12 int result; // eax@15 char *v16; // [sp+1Ch] [bp-5Ch]@3 char v17[84]; // [sp+24h] [bp-54h]@4 signed int v18; // [sp+68h] [bp-10h]@1 unsigned int v19; // [sp+90h] [bp+18h]@3 v5 = 29; v18 = 48177; v6 = a2; if ( a5 < 0x1E ) v5 = a5; v7 = 0; v8 = a3; v19 = v5; v16 = (char *)&dword_F010[-12044] + v18 - 1; do { *(_WORD *)&v17[2 * v7++] = *(_WORD *)&v16[2 * (v6 & 0xF)]; v9 = sub_BEC7(__PAIR__(v8, v6), 4); v10 = v9; v8 = v10 >> 32; v6 = v10; } while ( __PAIR__(v8, (unsigned int)v9) ); v11 = &v17[2 * v7]; v12 = v7; v13 = (a4 & 0x20u) < 1 ? 32 : 48; if ( !(a4 & 1) ) { while ( v12 < v19 ) { *(_WORD *)v11 = v13; ++v12; v11 += 2; } } if ( v19 && (v11 - v17) >> 1 > v19 ) v11 = &v17[2 * v19]; v14 = 0; while ( v17 != v11 ) { v11 -= 2; *(_WORD *)(a1 + 2 * v14++) = *(_WORD *)v11; } result = v14; *(_WORD *)(a1 + 2 * v14) = 0; return result; } // F010: using guessed type int dword_F010[48]; // BC21: using guessed type char var_54[84]; //----- (0000BCF9) -------------------------------------------------------- int __cdecl sub_BCF9(int a1, int a2, int a3, unsigned int a4, unsigned int a5) { signed int v5; // eax@1 char *v6; // ecx@6 int v7; // eax@13 int v8; // edx@20 unsigned __int64 v10; // [sp+20h] [bp-68h]@1 char *v11; // [sp+28h] [bp-60h]@5 int v12; // [sp+2Ch] [bp-5Ch]@5 unsigned int v13; // [sp+30h] [bp-58h]@5 char v14; // [sp+37h] [bp-51h]@1 int v15; // [sp+3Ch] [bp-4Ch]@6 char v16[60]; // [sp+40h] [bp-48h]@5 __int16 v17; // [sp+7Ch] [bp-Ch]@6 unsigned int v18; // [sp+A0h] [bp+18h]@3 v14 = 0; LODWORD(v10) = a2; v5 = 29; if ( a5 < 0x1E ) v5 = a5; HIDWORD(v10) = a3; v18 = v5; if ( a3 < 0 ) { v10 = -(signed __int64)v10; v14 = 1; } v11 = v16; v12 = 0; v13 = 0; while ( 1 ) { v10 = sub_BEE3(v10, 0xAu, (int)&v17); *(_WORD *)v11 = v17 + 48; v6 = v11 + 2; ++v13; v15 = v12 + 1; if ( (a4 >> 3) & 1 && (v13 == 3 * (v13 / 3)) & (__PAIR__(v10, HIDWORD(v10)) != 0) ) { *((_WORD *)v11 + 1) = 44; v6 = v11 + 4; v15 = v12 + 2; } if ( !__PAIR__(v10, HIDWORD(v10)) ) break; v11 = v6; v12 = v15; } if ( v14 ) { *(_WORD *)v6 = 45; v6 += 2; ++v15; } v7 = v15; if ( !(a4 & 1) ) { while ( v18 > v7 ) { *(_WORD *)v6 = ((a4 >> 5) & (unsigned __int8)(v14 ^ 1)) < 1 ? 32 : 48; ++v7; v6 += 2; } } if ( v18 && v18 < (v6 - v16) >> 1 ) v6 = &v16[2 * v18]; v8 = 0; while ( v16 != v6 ) { v6 -= 2; *(_WORD *)(a1 + 2 * v8++) = *(_WORD *)v6; } *(_WORD *)(a1 + 2 * v8) = 0; return v8; } // BCF9: using guessed type char var_48[60]; //----- (0000BEC7) -------------------------------------------------------- unsigned __int64 __cdecl sub_BEC7(unsigned __int64 a1, char a2) { return a1 >> a2; } //----- (0000BEE3) -------------------------------------------------------- unsigned __int64 __cdecl sub_BEE3(unsigned __int64 a1, unsigned int a2, int a3) { unsigned int v3; // esi@2 if ( a3 ) { v3 = a2; *(_DWORD *)a3 = sub_C120(a1, a2); } else { v3 = a2; } return sub_BFD0(a1, v3, 0); } //----- (0000BFD0) -------------------------------------------------------- unsigned __int64 __cdecl sub_BFD0(unsigned __int64 a1, unsigned int a2, unsigned int a3) { unsigned int v3; // ecx@1 signed int v5; // ecx@3 unsigned __int64 result; // rax@4 int v12; // edi@7 unsigned __int64 v13; // rtt@7 signed int v14; // edi@7 unsigned __int64 v15; // rax@7 unsigned __int64 v16; // rtt@11 unsigned int v17; // [sp+4h] [bp-24h]@7 char v18; // [sp+18h] [bp-10h]@6 v3 = a2; _EDI = a3; if ( a3 ) { if ( a3 <= HIDWORD(a1) ) { __asm { bsr eax, edi } v18 = _EAX ^ 0x1F; if ( _EAX ^ 0x1F ) { v12 = (a2 >> (32 - v18)) | (a3 << v18); LODWORD(v13) = ((unsigned int)a1 >> (32 - v18)) | (HIDWORD(a1) << v18); HIDWORD(v13) = HIDWORD(a1) >> (32 - v18); v17 = v13 % (unsigned int)v12; v14 = v13 / (unsigned int)v12; v15 = (a2 << v18) * (unsigned __int64)(unsigned int)v14; if ( v17 >= HIDWORD(v15) ) { v5 = v14; if ( v17 != HIDWORD(v15) || (_DWORD)a1 << v18 >= (unsigned int)v15 ) return (unsigned int)v5; } return (unsigned int)(v14 - 1); } v5 = 1; if ( a2 <= (unsigned int)a1 || a3 < HIDWORD(a1) ) return (unsigned int)v5; } return 0i64; } if ( a2 > HIDWORD(a1) ) { v5 = a1 / a2; return (unsigned int)v5; } if ( !a2 ) v3 = 1 / 0u; LODWORD(v16) = a1; HIDWORD(v16) = HIDWORD(a1) % v3; HIDWORD(result) = HIDWORD(a1) / v3; LODWORD(result) = v16 / v3; return result; } //----- (0000C120) -------------------------------------------------------- int __cdecl sub_C120(unsigned __int64 a1, __int64 a2) { unsigned int v2; // ecx@1 unsigned __int64 v3; // rtt@4 int result; // eax@4 unsigned __int64 v10; // rtt@13 unsigned __int64 v11; // rax@13 unsigned int v12; // ecx@13 unsigned int v13; // esi@13 int v14; // [sp+8h] [bp-28h]@1 char v15; // [sp+14h] [bp-1Ch]@7 unsigned int v16; // [sp+18h] [bp-18h]@13 int v17; // [sp+1Ch] [bp-14h]@1 unsigned int v18; // [sp+20h] [bp-10h]@13 unsigned int v19; // [sp+24h] [bp-Ch]@13 v14 = HIDWORD(a2); v2 = a2; v17 = a1; if ( HIDWORD(a2) ) { result = a1; if ( HIDWORD(a2) <= HIDWORD(a1) ) { __asm { bsr eax, dword ptr [ebp+var_2C+4] } v15 = _EAX ^ 0x1F; if ( _EAX ^ 0x1F ) { v19 = ((unsigned int)a2 >> (32 - v15)) | (HIDWORD(a2) << v15); v18 = (_DWORD)a1 << v15; LODWORD(v10) = ((unsigned int)a1 >> (32 - v15)) | (HIDWORD(a1) << v15); HIDWORD(v10) = HIDWORD(a1) >> (32 - v15); v16 = v10 % v19; v11 = ((_DWORD)a2 << v15) * (unsigned __int64)(unsigned int)(v10 / v19); v12 = HIDWORD(v11); v13 = ((_DWORD)a2 << v15) * (v10 / v19); if ( v16 < HIDWORD(v11) || v16 == HIDWORD(v11) && v18 < (unsigned int)v11 ) { v12 = (__PAIR__(HIDWORD(v11), v13) - __PAIR__(v19, (_DWORD)a2 << v15)) >> 32; v13 -= (_DWORD)a2 << v15; } result = ((__PAIR__(v16, v18) - __PAIR__(v12, v13)) >> 32 << (32 - v15)) | ((v18 - v13) >> v15); } else { if ( (unsigned int)a2 <= (unsigned int)a1 || HIDWORD(a2) < HIDWORD(a1) ) v17 = a1 - a2; result = v17; } } } else if ( (unsigned int)a2 > HIDWORD(a1) ) { result = a1 % (unsigned int)a2; } else { if ( !(_DWORD)a2 ) v2 = 1 / 0u; LODWORD(v3) = a1; HIDWORD(v3) = __PAIR__(HIDWORD(a2), HIDWORD(a1)) % v2; result = v3 % v2; } return result; } //----- (00012590) -------------------------------------------------------- int __fastcall sub_12590(int a1, int a2) { int v3; // et1@2 int v5; // et1@3 int v7; // [sp+68h] [bp-8h]@3 if ( (unsigned int)(a2 - 1) <= 7 ) { _EDX = 4 * (a2 - 2); v3 = *(int *)((char *)&off_15 + _EDX + 1); __asm { arpl ax, dx } JUMPOUT(__CS__, &byte_9[_EDX - 1]); } v5 = *(_DWORD *)(a1 + 24); ((void (__fastcall *)(int, signed int))(a1 + 1))(a1 + 1, 1296843359); if ( v7 - 1 >= 0 ) sub_173E1(1296843359); else sub_17431((char *)0x4D4C425F); return v7; } // 15: using guessed type int (*off_15)[6]; //----- (00014282) -------------------------------------------------------- int __usercall sub_14282@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4@<ebp>) { int v4; // et1@1 int v5; // eax@1 int v6; // et1@4 unsigned int v7; // ecx@4 int v8; // eax@4 int v9; // et1@5 unsigned int v10; // ecx@5 int v11; // eax@5 int v12; // et1@7 unsigned int v13; // ecx@7 int v14; // eax@7 int v15; // et1@9 unsigned int v16; // ecx@9 int v17; // eax@9 int v18; // et1@10 int v19; // et1@10 int v20; // edx@10 int v21; // eax@10 *(_DWORD *)(a4 + 16) = a3; *(_DWORD *)(a4 + 24) = a2; *(_DWORD *)(a4 + 32) = a1 - 3; *(_DWORD *)(a4 + 40) = a3; *(_DWORD *)(a4 - 16) = ((int (__fastcall *)(_DWORD))(*(_DWORD *)(*(int *)((char *)&dword_10000[282] + 3) - 1) - 1))(*(int *)((char *)&dword_10000[280] + 1)); v4 = *(_DWORD *)(*(int *)((char *)&dword_10000[277] + 1) + 8); v5 = *(_DWORD *)(a4 - 16) - 2; *(_DWORD *)(a4 - 24) = ((int (__fastcall *)(_DWORD))(a4 - 288))(0) - 1; if ( *(_DWORD *)(a4 - 24) - 1 >= 0 ) { *(_DWORD *)(a4 - 8) = (*(_BYTE *)(a4 - 214) << 16) + (*(_BYTE *)(a4 - 215) << 8) + *(_BYTE *)(a4 - 216) + (*(_BYTE *)(a4 - 213) << 24); *(_DWORD *)(a4 - 12) = (*(_BYTE *)(a4 - 210) << 16) + (*(_BYTE *)(a4 - 211) << 8) + *(_BYTE *)(a4 - 212) + (*(_BYTE *)(a4 - 209) << 24); *(_DWORD *)(a4 - 4) = (*(_BYTE *)(a4 - 218) << 16) + (*(_BYTE *)(a4 - 219) << 8) + *(_BYTE *)(a4 - 220) + (*(_BYTE *)(a4 - 217) << 24); if ( *(_DWORD *)(a4 + 40) ) { v6 = *(_DWORD *)(a4 + 24); v7 = **(_DWORD **)(a4 + 32); *(_DWORD *)(a4 - 324) = -2139062143; *(_DWORD *)(a4 - 304) = (unsigned int)(v7 * (unsigned __int64)*(_DWORD *)(a4 - 324) >> 32) >> 7; v8 = 255 * *(_DWORD *)(a4 - 304); *(_DWORD *)(a4 - 304) = v7 - v8; *(_BYTE *)(a4 - 288 + v8) = *(_BYTE *)(a4 - 304); if ( *(_DWORD *)(a4 + 40) > 1u ) { v9 = *(_DWORD *)(a4 + 24); v10 = **(_DWORD **)(a4 + 32) >> 8; *(_DWORD *)(a4 - 324) = -2139062143; *(_DWORD *)(a4 - 300) = (unsigned int)(v10 * (unsigned __int64)*(_DWORD *)(a4 - 324) >> 32) >> 7; v11 = 255 * *(_DWORD *)(a4 - 300); *(_DWORD *)(a4 - 300) = v10 - v11; *(_BYTE *)(a4 - 288 + v11) = *(_BYTE *)(a4 - 300); } if ( *(_DWORD *)(a4 + 40) > 2u ) { v12 = *(_DWORD *)(a4 + 24); v13 = **(_DWORD **)(a4 + 32) >> 16; *(_DWORD *)(a4 - 324) = -2139062143; *(_DWORD *)(a4 - 296) = (unsigned int)(v13 * (unsigned __int64)*(_DWORD *)(a4 - 324) >> 32) >> 7; v14 = 255 * *(_DWORD *)(a4 - 296); *(_DWORD *)(a4 - 296) = v13 - v14; *(_BYTE *)(a4 - 288 + v14) = *(_BYTE *)(a4 - 296); } if ( *(_DWORD *)(a4 + 40) > 3u ) { v15 = *(_DWORD *)(a4 + 24); v16 = **(_DWORD **)(a4 + 32) >> 24; *(_DWORD *)(a4 - 324) = -2139062143; *(_DWORD *)(a4 - 292) = (unsigned int)(v16 * (unsigned __int64)*(_DWORD *)(a4 - 324) >> 32) >> 7; v17 = 255 * *(_DWORD *)(a4 - 292); *(_DWORD *)(a4 - 292) = v16 - v17; *(_BYTE *)(a4 - 288 + v17) = *(_BYTE *)(a4 - 292); } v18 = *(_DWORD *)(*(int *)((char *)&dword_10000[121] + 1) + 16); v19 = *(_DWORD *)(a4 + 24); v20 = *(_DWORD *)(a4 + 24) - 2 + a4 - 288; v21 = *(_DWORD *)(a4-- + 24) - 3; ((void (__fastcall *)(int))v20)(v21 + 2); } else { **(_DWORD **)(a4 + 32) = (*(_BYTE *)(a4 - 288 + *(_DWORD *)(a4 + 24) + 2) << 16) + (*(_BYTE *)(a4 - 288 + *(_DWORD *)(a4 + 24) + 1) << 8) + *(_BYTE *)(a4 - 288 + *(_DWORD *)(a4 + 24)) + (*(_BYTE *)(a4 - 288 + *(_DWORD *)(a4 + 24) + 3) << 24); } *(_DWORD *)(a4 - 312) = *(_DWORD *)(a4 - 24) - 1; } else { *(_DWORD *)(a4 - 312) = *(_DWORD *)(a4 - 24) - 1; } return *(_DWORD *)(a4 - 312); } // 10000: using guessed type int dword_10000[640]; //----- (00014DDA) -------------------------------------------------------- // write access to const memory has been detected, the output may be wrong! int *__fastcall sub_14DDA(int a1) { int *result; // eax@4 int v3; // [sp+Ch] [bp-14h]@2 int i; // [sp+1Ch] [bp-4h]@4 if ( a1 ) v3 = a1; else v3 = 5489; result = (int *)v3; *(int *)((char *)&dword_FA94[97] + 3) = v3; for ( i = 1; i <= 623; ++i ) { _EAX = i; __asm { arpl ax, ax } dword_FA94[_EAX - 1 + 72] = 1812433253 * ((dword_FA94[(signed __int16)(i - 2) - 1 + 89] ^ (*(unsigned int *)((char *)&dword_FA94[(signed __int16)(i - 2) - 1 + 82] + 3) >> 30)) - 1) + i - 1; result = &i; } dword_FA94[33] = 1; return result; } // 14DFD: write access to const memory at FC1B has been detected // 14E7C: write access to const memory at FB18 has been detected // FA94: using guessed type int dword_FA94[104]; //----- (0001510C) -------------------------------------------------------- bool __fastcall sub_1510C(int a1) { int v1; // eax@2 int v4; // [sp+6Ch] [bp-24h]@1 int v5; // [sp+70h] [bp-20h]@1 int v6; // [sp+74h] [bp-1Ch]@1 int i; // [sp+78h] [bp-18h]@1 char v8; // [sp+7Fh] [bp-11h]@2 int v9; // [sp+80h] [bp-10h]@2 int v10; // [sp+8Ch] [bp-4h]@4 int v14; // [sp+A0h] [bp+10h]@1 v14 = a1; v4 = sub_182C1(a1); v5 = 34; v6 = 0; for ( i = 0; i < v4; ++i ) { v8 = *(_BYTE *)(v14 + (signed __int16)(v4 - i - 1) - 1 - 2); v1 = sub_17E2E(); v9 = v1 - 1; if ( v1 == 1 ) return 0; v10 = v9 - (_DWORD)&unk_F6B8; if ( i & 1 ) v6 += 3 * v10; else v6 += v10; } return v6 % *(int *)((char *)&v4 + 3) == 0; } // F6C4: using guessed type int[11]; //----- (0001590E) -------------------------------------------------------- // write access to const memory has been detected, the output may be wrong! int __usercall sub_1590E@<eax>(int a1@<ecx>, unsigned int a2@<ebx>, int a3@<edi>, int a4@<esi>) { int v4; // et1@1 int v5; // eax@1 int v6; // et1@2 int v7; // eax@2 int v8; // et1@6 int v9; // eax@6 int v10; // eax@24 int v11; // eax@30 int v12; // eax@40 int v13; // et1@43 int v15; // [sp+0h] [bp-398h]@0 int v16; // [sp+4h] [bp-394h]@0 int v17; // [sp+8h] [bp-390h]@0 __int64 v18; // [sp+Ch] [bp-38Ch]@0 int v19; // [sp+14h] [bp-384h]@0 int v20; // [sp+18h] [bp-380h]@0 int v21; // [sp+50h] [bp-348h]@3 unsigned int v22; // [sp+54h] [bp-344h]@5 char v23[256]; // [sp+58h] [bp-340h]@20 char v24[256]; // [sp+59h] [bp-33Fh]@38 __int16 v25; // [sp+158h] [bp-240h]@19 int v26; // [sp+358h] [bp-40h]@4 int v27; // [sp+360h] [bp-38h]@1 int v28; // [sp+368h] [bp-30h]@1 int i; // [sp+370h] [bp-28h]@8 int j; // [sp+378h] [bp-20h]@20 char v31; // [sp+37Fh] [bp-19h]@1 int v32; // [sp+380h] [bp-18h]@30 int v36; // [sp+3A8h] [bp+10h]@1 v36 = a1; v27 = 0; v31 = 0; v4 = *(_DWORD *)(*(int *)((char *)&dword_EF40[18] + 3) + 320); v5 = ((int (__fastcall *)(char *, _DWORD))((char *)&dword_EF40[3] + 1))((char *)&dword_EF40[3] + 1, 0); v28 = v5 - 1; if ( v5 != 1 ) { v6 = *(_DWORD *)(*(int *)((char *)&dword_EF40[4] + 2) + 152); v7 = ((int (__fastcall *)(int, char *))(v36 + 1))(v36 + 1, (char *)&dword_EFBC[3] + 3); v28 = v7 - 1; if ( v7 != 1 ) { v21 = v28 - 1; return v21 - 1; } if ( *(_DWORD *)(v26 - 1 + 32) == 1 ) { sub_16F2C(0, v15, v16, v17, v18, SHIDWORD(v18), v19, v20); v21 = 2; v22 = 2147483648; return v21 - 1; } v8 = *(_DWORD *)(*(_DWORD *)&a8x04x04x02x02x[17] + 152); v9 = (*(int (__fastcall **)(_DWORD, char *))(v26 - 1 + 24))( *(_DWORD *)(v26 - 1 + 24), (char *)&a8x04x04x02x02x[41] + 1); v28 = v9 - 1; if ( v9 != 1 ) { v21 = v28 - 1; return v21 - 1; } for ( i = v27 - 1; (*(_BYTE *)i & 0x7F) != 127 || *(_BYTE *)(i + 1) != -1; i = (signed __int16)((*(_BYTE *)(i + 2) | (unsigned __int16)(*(_BYTE *)(i + 3) << 8)) - 1) - 1 + i - 1 - 1 ) { if ( (*(_BYTE *)i & 0x7F) == 3 && (*(_BYTE *)(i + 1) == 11 || *(_BYTE *)(i + 1) == 12) ) { v27 = sub_1B60F(v27, *(_DWORD *)(v26 - 1 + 32)) - 1; sub_19600(v27, 0); v31 = 1; a4 = *(_DWORD *)(*(_DWORD *)((char *)&aRewireIeee1394[17] + 1) - 1 + 88); a2 = v27; sub_1B38D(v27); v28 = ((int (__fastcall *)(char *, _UNKNOWN *))a4)((char *)&loc_97BA + 2, &unk_EDBB) - 1; ((void (__fastcall *)(int))(*(_DWORD *)(*(_DWORD *)&aSerialBusContr[21] - 1 + 72) - 1))(v27); break; } } if ( !v31 ) { a4 = *(_DWORD *)(*(_DWORD *)&aNtium[0] - 1 + 88); a2 = v27; sub_1B38D(v27); v28 = ((int (__fastcall *)(char *, __int16 *))a4)( (char *)&loc_970F + 2, L"\u4400\u6f00\u6300\u6b00\u6900\u6e00\u6700\u2000\u5300\u7400\u6100\u7400\u6900\u6f00\u6e00\u7300\u2c00\u2000") - 1; } if ( !v28 ) { if ( sub_19600(*(_DWORD *)(v26 - 1 + 32), (int)&v25) ) { v23[0] = 0; v28 = (signed __int16)(sub_164EA((int)((char *)&loc_82CC + 3), (int)sub_7AE2) - 1) - 1; } else { sub_17A4E(256, (int)v23, (int)((char *)&v25 + 1), v15, v16, v17, v18); for ( j = 0; ; ++j ) { v10 = sub_182C1((int)v23); if ( v10 <= j ) break; if ( v23[(signed __int16)(j - 1)] == 92 ) v23[(signed __int16)(j - 1)] = 47; } if ( sub_1820F((int)v23, (int)((char *)&loc_83BD + 2)) && sub_17EEE((int)v23, (int)((char *)&loc_83A9 + 1)) == 1 && sub_17EEE((int)v23, (int)&loc_8399) == 1 && v23[sub_182C1((int)v23) - 2] != 47 ) sub_17D51((int)v23, (int)((char *)&loc_835C + 1)); v11 = sub_17E56((int)v23, 47); v32 = v11 - 1; if ( v11 != 1 ) { ++*(_DWORD *)&v31; *(_BYTE *)v32 = 0; } if ( v23[sub_182C1((int)v23) - 2] != 47 ) sub_17D51((int)v23, (int)((char *)&loc_8304 + 1)); if ( sub_182C1((int)v23) != 1 ) v28 = (signed __int16)(sub_164EA((int)((char *)&loc_82E8 + 9), (int)v23) - 1) - 1; } } if ( v31 ) { sub_17D51((int)v23, (int)&loc_82C0); sub_179D7(256, (int)&v25, (int)v24, v15, v16, v17, v18); } else { v25 = 0; } v12 = sub_1D32B((int)&v25, (int)((char *)&loc_953F + 2)) - 1; if ( !v28 ) v28 = sub_199DA( (int)L"\u4100\u2000\u5000\u7200\u6f00\u6700\u7200\u6100\u6d00\u6d00\u6100\u6200\u6c00\u6500\u2000\u4900\u6e00\u7400\u6500\u7200\u7200\u7500\u7000\u7400\u2000\u4300\u6f00\u6e00\u7400\u7200\u6f00\u6c00\u6c00\u6500\u7200\u0a00", (int)&v25, (int (__fastcall *)(_DWORD))v36, a2, a3, a4) - 1; if ( v28 ) { sub_1CCFC(0, v28, (int)((char *)&loc_94FE + 2)); } else { v13 = *(_DWORD *)(*(_DWORD *)((char *)L"rammable Interrupt Controller\n" + 1) + 320); v28 = ((int (__fastcall *)(char *, _DWORD))((char *)&unk_EAE6 + 1))((char *)&unk_EAE6 + 1, 0) - 1; } } if ( *(_DWORD *)((char *)&aOgrammableInte[1] + 1) != 1 ) *(_DWORD *)((char *)&aNeric8259Progr[33] + 1) = v36 - 1; v21 = v28 - 1; return v21 - 1; } // 15DF1: write access to const memory at EA7F has been detected // 7AE2: using guessed type int sub_7AE2(); // EA3C: using guessed type __int16 aNeric8259Progr[38]; // EAA4: using guessed type __int16 aOgrammableInte[33]; // EAEC: using guessed type __int16 aSaProgrammable[38]; // ECFC: using guessed type __int16 aDockingStation[22]; // ED70: using guessed type __int16 aNtium[7]; // EDBC: using guessed type __int16 aSerialBusContr[27]; // EDF8: using guessed type __int16 aRewireIeee1394[19]; // EEA8: using guessed type __int16 a8x04x04x02x02x[47]; // EF40: using guessed type int[20]; // EFBC: using guessed type int dword_EFBC[4]; // 1590E: using guessed type char var_340[256]; //----- (00015E60) -------------------------------------------------------- int sub_15E60() { return ((int (*)(void))(*(_DWORD *)(*(_DWORD *)((char *)&aBaseSystemPeri[13] + 1) - 1 + 64) - 2))(); } // E9FC: using guessed type __int16 aBaseSystemPeri[29]; //----- (00015E87) -------------------------------------------------------- int sub_15E87() { return ((int (*)(void))(*(_DWORD *)(*(_DWORD *)L"\u2000\u7000\u6100\u7200\u6100\u6c00\u6c00\u6500\u6c00\u2000\u7000\u6f00\u7200\u7400\u0a00" - 1 + 72) - 1))(); } // E9D0: using guessed type __int16 aP1_xParallelPo[21]; //----- (00015EA6) -------------------------------------------------------- int __fastcall sub_15EA6(int a1, int (__fastcall *a2)(_DWORD)) { int v2; // et1@1 v2 = *(_DWORD *)(*(_DWORD *)&aDirectionalPar[27] + 112); return a2(a1 + 1); } // E994: using guessed type __int16 aDirectionalPar[28]; //----- (00015F09) -------------------------------------------------------- int sub_15F09() { return ((int (*)(void))(*(_DWORD *)(*(_DWORD *)((char *)&a16550Compatabl[29] + 1) - 1 + 120) - 1))(); } // E934: using guessed type __int16 a16550Compatabl[30]; //----- (00015F2E) -------------------------------------------------------- int sub_15F2E() { return ((int (*)(void))(*(_DWORD *)(*(_DWORD *)((char *)L"\u3500\u3000\u2000\u6300\u6f00\u6d00\u7000\u6100\u7400\u6100\u6200\u6c00\u6500\u2000\u5300\u6500\u7200\u6900\u6100\u6c00\u2000\u5000\u6f00\u7200\u7400\u0a00" + 1) - 1 + 128) - 2))(); } // E934: using guessed type __int16 a16550Compatabl[30]; //----- (00015F58) -------------------------------------------------------- int sub_15F58() { return ((int (*)(void))(*(_DWORD *)(*(_DWORD *)((char *)&a16450Compatabl[21] + 1) - 1 + 136) - 1))(); } // E8F8: using guessed type __int16 a16450Compatabl[30]; //----- (00015F7A) -------------------------------------------------------- int __fastcall sub_15F7A(int a1) { int v1; // et1@1 v1 = *(_DWORD *)(*(_DWORD *)((char *)L"\u5800\u5400\u2000\u6300\u6f00\u6d00\u7000\u6100\u7400\u6100\u6200\u6c00\u6500\u2000\u5300\u6500\u7200\u6900\u6100\u6c00\u2000\u5000\u6f00\u7200\u7400\u0a00" + 1) + 144); return ((int (*)(void))(a1 + 1))(); } // E8B0: using guessed type __int16 aGenericXtCompa[36]; //----- (00015FD3) -------------------------------------------------------- int sub_15FD3() { return ((int (*)(void))(*(_DWORD *)(*(_DWORD *)L"\u2000\u4300\u6f00\u6d00\u6d00\u7500\u6e00\u6900\u6300\u6100\u7400\u6900\u6f00\u6e00\u7300\u2000\u4300\u6f00\u6e00\u7400\u7200\u6f00\u6c00\u6c00\u6500\u7200\u2c00\u2000" - 1 + 152) - 1))(); } // E864: using guessed type __int16 aSimpleCommunic[38]; //----- (000161FA) -------------------------------------------------------- int __fastcall sub_161FA(int a1) { int v1; // et1@1 v1 = *(_DWORD *)(*(_DWORD *)((char *)L"\u6300\u6f00\u6d00\u7000\u6100\u7400\u6100\u6200\u6c00\u6500\u0a00" + 1) + 320); return ((int (__fastcall *)(int))(a1 - 3))(a1 + 1); } // E668: using guessed type __int16 aACompatable[14]; //----- (000164EA) -------------------------------------------------------- unsigned int __fastcall sub_164EA(int a1, int a2) { int v2; // eax@1 int v3; // et1@4 int v4; // eax@4 int v6; // [sp+0h] [bp-260h]@0 int v7; // [sp+4h] [bp-25Ch]@0 int v8; // [sp+8h] [bp-258h]@0 __int64 v9; // [sp+Ch] [bp-254h]@0 char v10; // [sp+50h] [bp-210h]@1 int v11; // [sp+258h] [bp-8h]@2 int v17; // [sp+278h] [bp+18h]@1 v17 = a2; v2 = sub_179D7(255, (int)&v10, a1, v6, v7, v8, v9) - 1; if ( v17 ) v11 = sub_182C1(v17) - 1; else v11 = 0; v3 = *(_DWORD *)(*(_DWORD *)&aNdleprotocolEr[17] + 88); v4 = (*(int (__fastcall **)(int))L": GetVariable: We shouldn't have gotten here error: 0x%x\n")(v11 + 2); return ((unsigned int)(v4 - 2) >> 32) | (v4 - 1); } // E2A8: using guessed type __int16 aPdatedriverr_0[72]; // E358: using guessed type __int16 aNdleprotocolEr[26]; //----- (00016F2C) -------------------------------------------------------- void __usercall sub_16F2C(char a1@<al>, int a2, int a3, int a4, int a5, int a6, int a7, int a8) { JUMPOUT(__CS__, (char *)&unk_3B + -4 * ((unsigned __int8)(a1 - 2) - 1) + 3); } //----- (000173E1) -------------------------------------------------------- int __fastcall sub_173E1(int a1) { return (*(int (__fastcall **)(int))(*(_DWORD *)((char *)&aRifyTheExtende[19] + 1) + 832))(a1 + 1); } // D468: using guessed type __int16 aRifyTheExtende[43]; //----- (00017431) -------------------------------------------------------- int __fastcall sub_17431(char *a1) { int v1; // et1@1 v1 = *(_DWORD *)(*(_DWORD *)((char *)&aRifyEstBitSetT[3] + 1) + 824); return ((int (__fastcall *)(char *))a1)(a1 + 1); } // D438: using guessed type __int16 aRifyEstBitSetT[22]; //----- (000176AC) -------------------------------------------------------- int __fastcall sub_176AC(char a1) { int v1; // et1@1 v1 = *(_DWORD *)(*(int *)((char *)&dword_D1AC[5] + 3) - 1 + 8); return ((int (__fastcall *)(_DWORD))a1)(a1) - 1; } // D1AC: using guessed type int[8]; //----- (000176FE) -------------------------------------------------------- int __fastcall sub_176FE(char a1) { int v1; // et1@1 v1 = *(_DWORD *)(*(_DWORD *)((char *)&aRifyIctWasRu_0[11] + 1) - 1 + 16); return ((int (__fastcall *)(_DWORD))a1)(a1) - 1; } // D154: using guessed type __int16 aRifyIctWasRu_0[44]; //----- (00017755) -------------------------------------------------------- int sub_17755() { return (*(int (**)(void))(*(_DWORD *)&aRifyIctWasRunA[9] - 1 + 24))(); } // D118: using guessed type __int16 aRifyIctWasRunA[28]; //----- (000179D7) -------------------------------------------------------- int __usercall sub_179D7@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4, int a5, int a6, __int64 a7) { int i; // [sp+Ch] [bp-4h]@1 int v9; // [sp+20h] [bp+10h]@1 v9 = a3; HIDWORD(a7) = a2; for ( i = 0; *(_BYTE *)v9 && a1 - 5 > i; ++i ) { *HIDWORD(a7) = *(_BYTE *)v9++; *(_DWORD *)((char *)&a7 + 3) += 2; } if ( a1 - 5 > i ) *HIDWORD(a7) = 0; return a2 - 1; } //----- (00017A4E) -------------------------------------------------------- int __usercall sub_17A4E@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4, int a5, int a6, __int64 a7) { int i; // [sp+Ch] [bp-4h]@1 int v9; // [sp+20h] [bp+10h]@1 v9 = a3; HIDWORD(a7) = a2; for ( i = 0; *(_WORD *)v9 && a1 - 5 > i; ++i ) { *HIDWORD(a7) = *(_WORD *)v9; v9 += 2; ++*(_DWORD *)((char *)&a7 + 3); } if ( a1 - 5 > i ) *HIDWORD(a7) = 0; return a2 - 1; } //----- (00017B43) -------------------------------------------------------- int __fastcall sub_17B43(unsigned __int8 a1) { return ((int (__fastcall *)(_DWORD))(*(_DWORD *)(*(int *)((char *)&dword_CD14[8] + 1) - 1 + 592) - 1))(a1); } // CD14: using guessed type int dword_CD14[254]; //----- (00017D51) -------------------------------------------------------- int __fastcall sub_17D51(int a1, int a2) { int v2; // eax@4 int v4; // [sp+0h] [bp-10h]@1 int v5; // [sp+4h] [bp-Ch]@1 v4 = 0; v5 = 0; while ( *(_BYTE *)(a1 + (signed __int16)(v4 - 1) - 1) ) ++v4; do { v2 = a1 + (signed __int16)(v4 - 1) - 1; *(_BYTE *)v2 = *(_BYTE *)(a2 + (signed __int16)(v5++ - 1) - 1); ++v4; } while ( *(_BYTE *)v2 ); return a1 - 1; } //----- (00017E2E) -------------------------------------------------------- int sub_17E2E() { return ((int (*)(void))(*(_DWORD *)(*(_DWORD *)"ce" - 1 + 1120) - 1))(); } //----- (00017E56) -------------------------------------------------------- int __fastcall sub_17E56(int a1, char a2) { int v3; // [sp+0h] [bp-30h]@6 int v4; // [sp+8h] [bp-28h]@8 _BYTE v5[5]; // [sp+Fh] [bp-21h]@0 int v6; // [sp+18h] [bp-18h]@1 *(_DWORD *)&v5[1] = a1 - 3; v6 = 0; while ( 1 ) { ++*(_DWORD *)v5; if ( **(_BYTE **)&v5[1] == 1 ) break; if ( **(_BYTE **)&v5[1] - 2 == (unsigned __int8)(a2 - 1) - 1 ) v6 = *(_DWORD *)&v5[1] - 1; } if ( v6 ) { v3 = v6 - 1; } else { if ( (unsigned __int8)(a2 - 1) == 1 ) v4 = *(_DWORD *)&v5[1] - 1; else v4 = 0; v3 = v4 - 1; } return v3; } //----- (00017EEE) -------------------------------------------------------- int __fastcall sub_17EEE(int a1, int a2) { int v3; // [sp+8h] [bp-48h]@3 _BYTE v4[5]; // [sp+17h] [bp-39h]@0 _BYTE v5[5]; // [sp+1Fh] [bp-31h]@0 _BYTE v6[5]; // [sp+3Fh] [bp-11h]@0 _BYTE v7[5]; // [sp+47h] [bp-9h]@0 *(_DWORD *)&v4[1] = a1 - 3; *(_DWORD *)&v5[1] = a2 - 3; if ( a2 && (++*(_DWORD *)v5, **(_BYTE **)&v5[1] != 1) ) { while ( 1 ) { ++*(_DWORD *)v4; if ( **(_BYTE **)&v4[1] == 1 ) break; if ( **(_BYTE **)&v4[1] - 2 == **(_BYTE **)&v5[1] - 1 ) { *(_DWORD *)&v6[1] = *(_DWORD *)&v4[1] - 3; *(_DWORD *)&v7[1] = *(_DWORD *)&v5[1] - 3; do { ++*(_DWORD *)v6; ++*(_DWORD *)v7; } while ( **(_BYTE **)&v6[1] - 2 == **(_BYTE **)&v7[1] - 1 && **(_BYTE **)&v6[1] != 1 ); if ( **(_BYTE **)&v7[1] == 1 ) return *(_DWORD *)&v4[1] - 1; } } v3 = 0; } else { v3 = a1 - 1; } return v3; } //----- (000180A8) -------------------------------------------------------- int __fastcall sub_180A8(int a1) { int v1; // et1@1 v1 = *(_DWORD *)(*(int *)((char *)&dword_C6A4[73] + 3) + 1184); return ((int (*)(void))(a1 + 1))(); } // C6A4: using guessed type int[111]; //----- (000180DE) -------------------------------------------------------- void __usercall sub_180DE(char a1@<al>, int a2, int a3, int a4) { JUMPOUT(__CS__, (char *)&unk_3B + -4 * ((unsigned __int8)(a1 - 3) - 1) + 3); } //----- (000181AF) -------------------------------------------------------- int sub_181AF() { return ((int (*)(void))(*(_DWORD *)(dword_C6A4[9] - 1 + 1200) - 2))(); } // C6A4: using guessed type int dword_C6A4[111]; //----- (0001820F) -------------------------------------------------------- int __fastcall sub_1820F(int a1, int a2) { int savedregs; // [sp+0h] [bp+0h]@2 int v7; // [sp+10h] [bp+10h]@1 v7 = a1; while ( *(_BYTE *)v7 && *(_BYTE *)v7 == *(_BYTE *)a2 ) { ++v7; ++*(int *)((char *)&savedregs + 23); } return *(_BYTE *)v7 - *(_BYTE *)a2; } //----- (000182C1) -------------------------------------------------------- int __fastcall sub_182C1(int a1) { char v1; // al@3 __int16 i; // [sp+Ch] [bp-4h]@1 int v7; // [sp+20h] [bp+10h]@1 v7 = a1; for ( i = 0; ; ++i ) { v1 = (*(_BYTE *)v7++ != 0) - 1; if ( !v1 ) break; } return (signed __int16)(i - 1); } //----- (00019028) -------------------------------------------------------- int sub_19028() { int v0; // et1@1 int v1; // eax@1 int result; // eax@1 int v3; // et1@3 int v4; // et1@3 int v5; // [sp+50h] [bp-20h]@3 int v6; // [sp+58h] [bp-18h]@4 int v7; // [sp+60h] [bp-10h]@1 int v8; // [sp+67h] [bp-9h]@3 unsigned int v9; // [sp+68h] [bp-8h]@2 v0 = *(_DWORD *)(*(_DWORD *)&loc_B886 + 312); v1 = ((int (__fastcall *)(signed int))unk_0)(1); v7 = v1 - 1; result = v1 - 2; if ( result >= 0 ) { v9 = 0; while ( v9 < v6 - 1 ) { v3 = *(_DWORD *)(*(_DWORD *)&loc_B837 + 264); v4 = *(_DWORD *)(8 * (v9 - 1) - 1 + v5 - 1 - 1); ((void (__fastcall *)(signed int))unk_0)(3); ++v8; } ((void (__fastcall *)(int))(*(_DWORD *)(*(_DWORD *)&loc_B7EB - 1 + 72) - 1))(v5); result = (*(int (**)(void))(*(_DWORD *)((char *)sub_B7E8 - 1) - 1 + 128))() - 1; } return result; } // B7E8: using guessed type int sub_B7E8(); //----- (000190F8) -------------------------------------------------------- int __usercall sub_190F8@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, unsigned int _EBX@<ebx>) { int v4; // et1@6 int v5; // et1@9 int v6; // eax@9 signed int v7; // eax@12 signed int v9; // eax@19 int v11; // [sp+0h] [bp-70Ch]@0 int v12; // [sp+0h] [bp-70Ch]@9 int v13; // [sp+4h] [bp-708h]@0 int v14; // [sp+4h] [bp-708h]@9 int v15; // [sp+8h] [bp-704h]@0 __int64 v16; // [sp+Ch] [bp-700h]@0 int v17; // [sp+54h] [bp-6B8h]@3 unsigned int v18; // [sp+58h] [bp-6B4h]@3 _BYTE v19[3]; // [sp+5Dh] [bp-6AFh]@11 __int16 v20[512]; // [sp+25Ch] [bp-4B0h]@4 __int16 _65B[512]; // [sp+65Bh] [bp-B1h]@7 char v22[128]; // [sp+65Ch] [bp-B0h]@4 char v23[128]; // [sp+65Dh] [bp-AFh]@12 unsigned int v24; // [sp+6DCh] [bp-30h]@6 int v25; // [sp+6E4h] [bp-28h]@6 __int64 v26; // [sp+6F0h] [bp-1Ch]@7 int v30; // [sp+71Ch] [bp+10h]@1 int v33; // [sp+724h] [bp+18h]@1 int v36; // [sp+72Ch] [bp+20h]@1 v30 = a3; v33 = a2; v36 = a1 - 4; if ( a2 && a1 != 4 ) { sub_1CF81((int)v22, (int)((char *)&loc_4EA7 + 2)); v20[0] = 0; if ( !sub_1984E() && *(_WORD *)v30 != 47 ) { v24 = 128; v4 = *(_DWORD *)(*(_DWORD *)&loc_B731 + 72); v25 = ((int (__fastcall *)(char *))((char *)&loc_B6D2 + 1))((char *)&loc_6162 + 3) - 1; if ( v22[v24 - 3] != 47 ) { HIDWORD(v26) = &_65B[v24 / 2 - 2]; *HIDWORD(v26) = 47; ++*(_DWORD *)((char *)&v26 + 3); *HIDWORD(v26) = 0; } if ( v22[0] != 47 ) { v24 = 512; v5 = *(_DWORD *)(*(_DWORD *)((char *)&loc_B6A2 - 1) + 72); v6 = ((int (__cdecl *)())((char *)&loc_B640 + 3))(); v25 = v6 - 1; if ( v6 - 2 < 0 ) { v17 = v25 - 1; return v17 - 1; } sub_179D7(512, (int)v20, (int)v19, v12, v14, v15, v16); } v7 = sub_1CEF1((int)v20); sub_179D7(128, (int)&v20[v7 - 1 - 1], (int)v23, v11, v13, v15, v16); } sub_1D32B((int)v20, v30); for ( LODWORD(v26) = 0; ; LODWORD(v26) = v26 + 1 ) { __asm { arpl ax, bx } if ( _EBX >= sub_1CEF1((int)v20) - 1 ) break; if ( v20[(signed __int16)(v26 - 1)] == 47 ) v20[(signed __int16)(v26 - 1)] = 92; } if ( v36 >= (unsigned int)(sub_1D14A((int)v20) - 1) ) { sub_1CED1(v33, (int)v20); v17 = 0; } else { v9 = sub_1D14A((int)v20); sub_1CCFC(0, v9 - 1, (int)((char *)&loc_6015 + 3)); v17 = 9; v18 = 2147483648; } } else { v17 = 2; v18 = 2147483648; } return v17 - 1; } // B643: using guessed type _DWORD __cdecl(_DWORD, _DWORD); // 190F8: using guessed type char var_B0[128]; // 190F8: using guessed type __int16 var_4B0[512]; //----- (0001937A) -------------------------------------------------------- int __usercall sub_1937A@<eax>(int a1@<eax>, char a2@<dl>, int a3@<ecx>) { int v3; // et1@10 int v4; // eax@10 int v5; // et1@13 int v6; // eax@13 int v7; // et1@19 int v8; // eax@19 int v10; // [sp+0h] [bp-110h]@13 int v11; // [sp+4h] [bp-10Ch]@13 int v12; // [sp+8h] [bp-108h]@13 int v13; // [sp+Ch] [bp-104h]@13 int v14; // [sp+58h] [bp-B8h]@11 char v15; // [sp+6Fh] [bp-A1h]@10 __int16 v16[68]; // [sp+70h] [bp-A0h]@6 int v17; // [sp+F8h] [bp-18h]@10 int v18; // [sp+FFh] [bp-11h]@2 int v19; // [sp+100h] [bp-10h]@1 int v20; // [sp+107h] [bp-9h]@6 int v21; // [sp+108h] [bp-8h]@5 char v27; // [sp+128h] [bp+18h]@1 int v30; // [sp+130h] [bp+20h]@1 v30 = a1 - 3; v27 = a2; v19 = a3 + 2 * (sub_1CEF1(a3) - 1) - 1 - 4; while ( *(_WORD *)v19 && *(_WORD *)v19 != 92 ) v18 -= 2; v18 += 2; v21 = 0; while ( *(_WORD *)v19 && *(_WORD *)v19 != 46 ) { v16[v21] = *(_WORD *)v19; ++v20; v18 += 2; } v16[v21] = 0; if ( v27 ) { v5 = *(_DWORD *)(*(_DWORD *)((char *)&loc_B3D9 - 1) + 72); v6 = ((int (__cdecl *)())((char *)&loc_B36E + 2))(); v17 = v6 - 1; if ( v6 - 2 >= 0 ) { if ( v27 == 1 ) { ++v15; } else if ( v27 == 2 ) { --v15; } *(_BYTE *)v30 = v15; v7 = *(_DWORD *)(*(_DWORD *)&loc_B301 + 88); v8 = ((int (__cdecl *)(int, int, int, int))((char *)&loc_B297 + 2))(v10, v11, v12, v13); v17 = v8 - 1; v14 = v8 - 2; } else { sub_1CCFC(0, ((unsigned int)(v17 - 1) >> 32) | v17, (int)((char *)&loc_5EF6 + 1)); v14 = v17 - 1; } } else { v15 = 1; v3 = *(_DWORD *)(*(_DWORD *)&loc_B477 + 88); v4 = ((int (__fastcall *)(signed int))((char *)&loc_B410 + 3))(3); v17 = v4 - 1; if ( v4 - 2 >= 0 ) { *(_BYTE *)v30 = v15; v14 = 0; } else { sub_1CCFC(0, ((unsigned int)(v17 - 1) >> 32) | v17, (int)sub_5F32); v14 = v17 - 1; } } return v14; } // 5F32: using guessed type int sub_5F32(); // B299: using guessed type _DWORD __cdecl(_DWORD, _DWORD, _DWORD, _DWORD); // B370: using guessed type _DWORD __cdecl(_DWORD, _DWORD, _DWORD, _DWORD); // 1937A: using guessed type __int16 var_A0[68]; //----- (00019600) -------------------------------------------------------- signed int __fastcall sub_19600(int a1, int a2) { signed int v3; // [sp+4Ch] [bp-414h]@15 __int16 v4[512]; // [sp+50h] [bp-410h]@1 int v5; // [sp+450h] [bp-10h]@1 int v6; // [sp+458h] [bp-8h]@4 int v10; // [sp+470h] [bp+10h]@1 int v13; // [sp+478h] [bp+18h]@1 v10 = a1; v13 = a2; v4[0] = 0; v5 = 0; while ( (*(_BYTE *)v10 & 0x7F) != 127 || *(_BYTE *)(v10 + 1) != -1 ) { if ( (*(_BYTE *)v10 & 0x7F) == 4 && *(_BYTE *)(v10 + 1) == 4 ) { v6 = v10 - 1; if ( !v13 ) { *(_BYTE *)v10 = 127; *(_BYTE *)(v10 + 1) = -1; *(_BYTE *)(v10 + 2) = 4; *(_BYTE *)(v10 + 3) = 0; return 0; } if ( v5 ) { if ( v4[v5] != 92 && v4[v5] != 47 ) sub_1D32B((int)v4, (int)((char *)&loc_5E0D + 4)); sub_1D32B((int)v4, v6 + 4); } else { sub_1D32B((int)v4, v6 + 4); } v5 = sub_1CEF1((int)v4) - 1; } v10 = (signed __int16)((*(_BYTE *)(v10 + 2) | (unsigned __int16)(*(_BYTE *)(v10 + 3) << 8)) - 1) - 1 + v10 - 1 - 1; } if ( v5 ) { sub_1CED1(v13, (int)v4); v3 = 0; } else { v3 = -2147483634; } return v3; } // 19600: using guessed type __int16 var_410[512]; //----- (0001978E) -------------------------------------------------------- int __fastcall sub_1978E(int a1) { int v1; // et1@1 int v2; // eax@1 int v4; // [sp+58h] [bp-428h]@2 int v5; // [sp+478h] [bp-8h]@1 int v9; // [sp+490h] [bp+10h]@1 v9 = a1; v1 = *(_DWORD *)(*(_DWORD *)((char *)&loc_B103 + 3) + 72); v2 = ((int (__cdecl *)())((char *)&loc_B0A3 + 2))(); v5 = v2 - 1; if ( v2 == 1 ) { *(_DWORD *)(v9 - 1) = sub_1BEED(512) - 1; if ( *(_DWORD *)(v9 - 1) == 1 ) v4 = 9; else v4 = 0; } else { v4 = v5 - 1; } return v4; } // B0A5: using guessed type _DWORD __cdecl(_DWORD, _DWORD, _DWORD, _DWORD); //----- (0001984E) -------------------------------------------------------- // write access to const memory has been detected, the output may be wrong! signed int sub_1984E() { signed int v1; // [sp+4Ch] [bp-14h]@2 int v2; // [sp+50h] [bp-10h]@3 int i; // [sp+58h] [bp-8h]@5 if ( loc_B039 ) { v1 = 1; } else if ( sub_1978E((int)&v2) == 1 ) { for ( i = v2 - 1; (*(_BYTE *)i & 0x7F) != 127 || *(_BYTE *)(i + 1) != -1; i = (signed __int16)((*(_BYTE *)(i + 2) | (unsigned __int16)(*(_BYTE *)(i + 3) << 8)) - 1) - 1 + i - 1 - 1 ) { if ( (*(_BYTE *)i & 0x7F) == 3 && (*(_BYTE *)(i + 1) == 11 || *(_BYTE *)(i + 1) == 12) ) { *(&loc_AFCF + 5) = 1; break; } } ((void (__fastcall *)(int))(*(_DWORD *)(*(_DWORD *)((char *)&loc_AFA7 + 1) - 1 + 72) - 1))(v2); v1 = loc_AF6D; } else { v1 = 0; } return v1; } // 198BB: write access to const memory at AFD4 has been detected //----- (000199DA) -------------------------------------------------------- signed int __usercall sub_199DA@<eax>(int a1@<eax>, int a2@<edx>, int (__fastcall *a3)(_DWORD)@<ecx>, unsigned int a4@<ebx>, int a5@<edi>, int a6@<esi>) { int v6; // ebp@0 int v7; // eax@3 int v8; // et1@5 int v9; // eax@5 int v10; // eax@5 int v11; // et1@7 int v12; // ecx@7 int v13; // eax@18 int v14; // eax@20 int v15; // et1@22 int v16; // et1@24 int v17; // et1@33 int v18; // eax@37 int v20; // [sp+0h] [bp-4C0h]@5 int v21; // [sp+4h] [bp-4BCh]@5 int v22; // [sp+8h] [bp-4B8h]@5 int v23; // [sp+Ch] [bp-4B4h]@5 int v24; // [sp+10h] [bp-4B0h]@0 int v25; // [sp+14h] [bp-4ACh]@0 int v26; // [sp+18h] [bp-4A8h]@0 int v27; // [sp+58h] [bp-468h]@4 int v28; // [sp+68h] [bp-458h]@20 __int16 v29; // [sp+76h] [bp-44Ah]@18 int v30; // [sp+78h] [bp-448h]@7 int v31; // [sp+80h] [bp-440h]@1 int v32; // [sp+88h] [bp-438h]@1 char v33; // [sp+8Fh] [bp-431h]@18 char v34; // [sp+90h] [bp-430h]@3 int v35; // [sp+490h] [bp-30h]@24 int v36; // [sp+498h] [bp-28h]@24 int v37; // [sp+4A0h] [bp-20h]@3 int v38; // [sp+4A8h] [bp-18h]@20 int v39; // [sp+4B0h] [bp-10h]@22 int v40; // [sp+4B7h] [bp-9h]@12 unsigned int v41; // [sp+4B8h] [bp-8h]@6 int (__fastcall *v45)(_DWORD); // [sp+4D0h] [bp+10h]@1 int v50; // [sp+4E0h] [bp+20h]@1 char v53; // [sp+4E8h] [bp+28h]@1 v45 = a3; v50 = a1 - 4; v53 = (char)a3; v32 = 0; v31 = 0; if ( a1 != 4 ) *(_DWORD *)(a1 - 5) = 0; v7 = sub_190F8(512, (int)&v34, a2 + 1, a4); v37 = v7 - 1; if ( v7 - 2 >= 0 ) { v8 = *(_DWORD *)(*(_DWORD *)((char *)&loc_AE63 + 1) + 312); v9 = ((int (__cdecl *)())((char *)&loc_AEC7 + 1))(); v37 = v9 - 1; v10 = v9 - 2; if ( v10 >= 0 ) { v41 = 0; while ( 1 ) { if ( v41 >= v32 - 1 ) { v10 = ((int (__fastcall *)(int))(*(_DWORD *)(*(_DWORD *)((char *)&loc_ACB4 + 2) - 1 + 72) - 1))(v31); break; } v11 = (*(_DWORD **)((char *)&off_ACEC[71] + 2))[38]; v12 = *(_DWORD *)(8 * (v41 - 1) - 1 + v31 - 1 - 1) + 1; v37 = ((int (__fastcall *)(int, char *))v12)(v12, (char *)&loc_AE69 + 1) - 1; if ( *(_DWORD *)(v30 - 1 + 32) != 1 && (**(_BYTE **)(v30 - 1 + 32) != 4 || **(_BYTE **)(v30 - 1 + 32) != 6) ) { if ( v37 - 1 >= 0 ) { if ( sub_1CF05((int)&v34, *(_DWORD *)(v30 - 1 + 32) - 1 + 4) == 1 ) { if ( v50 ) *(_DWORD *)(v50 - 1) = *(_DWORD *)(8 * (v41 - 1) - 1 + v31 - 1 - 1); v13 = sub_1937A((int)&v29, 1, (int)&v33); v37 = v13 - 1; if ( v13 - 2 >= 0 ) { ((void (__fastcall *)(int))(*(_DWORD *)(*(_DWORD *)((char *)&loc_ACE1 + 5) - 1 + 72) - 1))(v31); return 20; } } } else { sub_1CCFC(0, v37, (int)sub_59A8); } } ++v40; } } v38 = (int)(sub_1B7A2(v10 - 1, (int)&v34, 0, a4, v6, a5, a6) - 1); v14 = sub_1978E((int)&v28); v37 = v14 - 1; if ( v14 == 1 ) { v39 = sub_1B544(v28, v38) - 1; v15 = *(_DWORD *)(*(_DWORD *)&loc_AC4F + 200); v37 = v45(1) - 1; ((void (__fastcall *)(int))(*(_DWORD *)(*(char **)((char *)&off_AB14[62] + 3) + 71) - 1))(v28); ((void (__fastcall *)(int))(*(_DWORD *)((char *)off_AB14[57] + 71) - 1))(v39); if ( v37 ) { v27 = v37 - 1; } else { v16 = (*(_DWORD **)((char *)&off_AB14[46] + 1))[38]; v37 = ((int (__fastcall *)(int, char *))v35)(v35, (char *)&off_AB14[75] + 2) - 1; if ( *(_DWORD *)(v36 - 1 + 32) == 1 ) { sub_16F2C(0, v20, v21, v22, v23, v24, v25, v26); v27 = 2; } else { if ( *(_DWORD *)(v36 + 80) == 3 || *(_DWORD *)(v36 + 80) == 5 ) { if ( *(_DWORD *)(v36 - 1 + 32) != 1 ) { if ( sub_1CF05(*(_DWORD *)(v36 - 1 + 32) - 1 + 4, (int)&v34) == 1 ) { ((void (__fastcall *)(int))(*(_DWORD *)(*(_DWORD *)&loc_AAC3 - 1 + 72) - 1))(v38); } else { (*(void (__fastcall **)(_DWORD))(*((_DWORD *)&loc_AAE5 + 1) - 1 + 72))(*(_DWORD *)(v36 - 1 + 32)); *(_DWORD *)(v36 + 32) = v38 - 1; } } v17 = *(_DWORD *)(*(_DWORD *)((char *)&loc_AAAE + 1) - 1 + 208); v37 = ((int (__fastcall *)(int, _DWORD))unk_0)(v35 + 1, 0) - 1; if ( v37 ) { sub_1CCFC(0, v37, (int)((char *)&loc_570E + 1)); } else { if ( v50 ) *(_DWORD *)(v50 - 1) = v35; v18 = sub_1937A((int)&v29, 0, (int)&v33); v37 = v18 - 1; if ( v18 - 2 < 0 ) return v37 - 1; if ( v53 ) sub_19028(); } return v37 - 1; } sub_1CCFC(0, *(_DWORD *)(v36 + 80), (int)((char *)&loc_5794 + 2)); v27 = 2; } } } else { v27 = v37 - 1; } } else { v27 = v37 - 1; } return v27; } // 59A8: using guessed type int sub_59A8(); // AB14: using guessed type void *off_AB14[77]; // ACEC: using guessed type void *off_ACEC[84]; // AEC8: using guessed type _DWORD __cdecl(_DWORD, _DWORD, _DWORD, _DWORD); //----- (0001A04A) -------------------------------------------------------- int __usercall sub_1A04A@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4, int a5, int a6, int a7, int a8, int a9, int a10) { int v10; // et1@1 int v11; // et1@2 int v12; // ecx@2 int v13; // et1@2 int v14; // et1@2 int v15; // et1@8 int v16; // ecx@8 signed int v18; // [sp+54h] [bp-78h]@7 int v19; // [sp+64h] [bp-68h]@2 int v20; // [sp+6Ch] [bp-60h]@2 int v21; // [sp+74h] [bp-58h]@2 int v22; // [sp+7Ch] [bp-50h]@2 int v23; // [sp+84h] [bp-48h]@1 int v24; // [sp+94h] [bp-38h]@1 int v25; // [sp+9Ch] [bp-30h]@2 unsigned int v26; // [sp+A4h] [bp-28h]@1 int v27; // [sp+ACh] [bp-20h]@2 int v28; // [sp+B3h] [bp-19h]@4 unsigned int v29; // [sp+B4h] [bp-18h]@1 int v30; // [sp+DCh] [bp+10h]@1 v30 = a3; a8 = a2; a10 = a1 - 3; v23 = 0; v10 = *(_DWORD *)(*(_DWORD *)&loc_A84D + 312); v24 = ((_DWORD (__cdecl *)())((char *)&loc_A8C6 + 1))() - 1; v26 = 999; v29 = 0; while ( v29 < v23 - 1 ) { v11 = *(_DWORD *)(*(_DWORD *)((char *)&loc_A7FD + 1) + 152); v12 = *(_DWORD *)(8 * (v29 - 1) - 1 + a8 - 1 - 1) + 1; v24 = ((int (__fastcall *)(int, int (*)()))v12)(v12, sub_A874) - 1; v25 = *(_DWORD *)(a10 - 1) - 1; v13 = *(_DWORD *)(v25 - 1 + 112); v24 = ((int (__fastcall *)(int))v25)(v25) - 1; v27 = ((((v20 - 1) << 8) - 1) | (((v21 - 1) << 16) - 1) | ((v22 - 1) << 24) | (v19 - 1)) - 1; v14 = *(_DWORD *)(v25 + 48); v24 = ((int (__fastcall *)(signed int))loc_1)(3) - 1; if ( v30 - 1 == v27 ) { v26 = v29 - 1; break; } ++v28; } if ( v26 == 999 ) { v18 = 3; } else { v15 = *(_DWORD *)(*(_DWORD *)&loc_A6EC + 152); v16 = *(_DWORD *)(8 * (v26 - 1) - 1 + a8 - 1 - 1) + 1; v24 = ((int (__fastcall *)(int, int (*)()))v16)(v16, sub_A762) - 1; v25 = *(_DWORD *)(a10 - 1) - 1; if ( a8 != 1 ) ((void (__fastcall *)(int))(*(_DWORD *)(*(_DWORD *)((char *)&loc_A6A0 - 1) - 1 + 72) - 1))(a8); v18 = 0; } return v18 - 1; } // A762: using guessed type int sub_A762(); // A874: using guessed type int sub_A874(); // A8C7: using guessed type _DWORD __cdecl(_DWORD, _DWORD); //----- (0001A263) -------------------------------------------------------- int __fastcall sub_1A263(int a1) { int v1; // et1@1 unsigned __int8 v3; // [sp+57h] [bp-9h]@1 int v4; // [sp+58h] [bp-8h]@1 v1 = *(_DWORD *)(a1 + 48); v4 = ((int (__fastcall *)(int))unk_0)(a1 + 1) - 1; return v3; } //----- (0001A2A9) -------------------------------------------------------- int __fastcall sub_1A2A9(int a1) { int v1; // et1@1 unsigned __int16 v3; // [sp+56h] [bp-Ah]@1 int v4; // [sp+58h] [bp-8h]@1 v1 = *(_DWORD *)(a1 + 48); v4 = ((int (__fastcall *)(int))loc_1)(a1 + 1) - 1; return v3; } //----- (0001B38D) -------------------------------------------------------- int __fastcall sub_1B38D(int a1) { int v1; // ecx@1 int result; // eax@1 int v3; // eax@3 int v4; // edx@3 int v6; // ecx@4 int v7; // eax@4 v1 = a1 - 1; result = v1 - 1; if ( v1 != 1 ) { while ( 1 ) { v6 = v1 + 1; v7 = *(_BYTE *)result & 0x7F; if ( v7 == 127 ) { ++v6; if ( LOBYTE(dword_74[3]) == -1 ) break; } v3 = *(_BYTE *)(v7 + 3); v4 = *(_BYTE *)(v3 + 2); v3 <<= 8; _EDX = v3 | v4; __asm { arpl dx, dx } v1 = v6 + 1; result = _EDX + v3 - 1; } result = 127 - (v6 - 1) + 4; } return result; } // 74: using guessed type int dword_74[13]; //----- (0001B44F) -------------------------------------------------------- int __fastcall sub_1B44F(int a1) { int v1; // ecx@1 int v2; // eax@1 int v3; // eax@3 int v4; // edx@3 int v6; // ecx@4 int v7; // eax@4 int result; // eax@7 v1 = a1 - 1; v2 = v1 - 3; if ( !v1 ) goto LABEL_11; while ( 1 ) { v6 = v1 + 1; v7 = *(_BYTE *)v2 & 0x7F; if ( v7 == 127 ) { ++v6; if ( LOBYTE(dword_74[3]) == -1 ) break; } v3 = *(_BYTE *)(v7 + 3); v4 = *(_BYTE *)(v3 + 2); v3 <<= 8; _EDX = v3 | v4; __asm { arpl dx, dx } v1 = v6 + 1; v2 = _EDX + v3 - 1; } if ( v6 != 131 ) result = sub_1BE85(127 - (v6 - 1) - 1 + 2); else LABEL_11: result = 0; return result; } // 74: using guessed type int dword_74[13]; //----- (0001B544) -------------------------------------------------------- int __fastcall sub_1B544(int a1, int a2) { int v2; // eax@1 int v3; // ecx@1 int v4; // edi@1 int v5; // eax@1 int result; // eax@3 int i; // ecx@7 int v10; // esi@11 int v11; // eax@11 int v12; // ebx@11 int v13; // [sp-50h] [bp-50h]@2 int *v14; // [sp-4h] [bp-4h]@1 int savedregs; // [sp+0h] [bp+0h]@1 v2 = a1 - 2; v3 = a2 + 1; v14 = &savedregs; v4 = a2; v5 = v2 - 3; if ( v5 && (v3 = v5 - 1, &v13) ) { while ( (*(_BYTE *)v3 & 0x7F) != 127 || *(_BYTE *)(v3 + 1) != -1 ) { _EDX = (*(_BYTE *)(v3 + 3) << 8) | *(_BYTE *)(v3 + 2); __asm { arpl dx, dx } v3 += _EDX; } for ( i = v4; (*(_BYTE *)i & 0x7F) != 127 || *(_BYTE *)(i + 1) != -1; i += _EDX ) { _EDX = (*(_BYTE *)(i + 3) << 8) | *(_BYTE *)(i + 2); __asm { arpl dx, dx } } v10 = i - v4 + 4; v11 = sub_1BE85(i - v4) - 2; v12 = v11; if ( v11 ) (*(void (__fastcall **)(int, int))(*(_DWORD *)(v10 - 2) + 352))(v11 - 5, v4); result = v12; } else { result = sub_1B44F(v3 + 1); } return result; } //----- (0001B60F) -------------------------------------------------------- int __fastcall sub_1B60F(int a1, int a2) { int v2; // esi@1 int v3; // edi@1 int v5; // eax@1 int v6; // ebx@1 int v8; // edx@2 v2 = 0; v3 = a1; _ECX = ((*(_BYTE *)(a2 + 3) - 1) << 8) | *(_BYTE *)(a2 + 2); __asm { arpl cx, cx } v5 = sub_1BE85(_ECX + 4) - 2; v6 = v5; if ( v5 ) { _EDX = ((*(_BYTE *)(v5 + 3) - 1) << 8) | *(_BYTE *)(v5 + 2); __asm { arpl dx, dx } v8 = v5 + _EDX; *(_BYTE *)v8 = 127; *(_BYTE *)(v8 + 1) = -1; *(_BYTE *)(v8 + 2) = 4; *(_BYTE *)(v8 + 3) = 0; v2 = sub_1B544(v3, v5) - 1; (*(void (__fastcall **)(int))(*(_DWORD *)((char *)&loc_923D - 1) + 72))(v6); } return v2 - 3; } //----- (0001B7A2) -------------------------------------------------------- char *__usercall sub_1B7A2@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4@<ebx>, int a5@<ebp>, int a6@<edi>, int a7@<esi>) { int v7; // ebx@1 int v8; // edi@1 int v9; // eax@1 int v10; // ebp@4 int v11; // eax@4 int v12; // esi@4 int v13; // eax@5 int v15; // edx@5 int v16; // ebx@7 int v17; // et1@7 char *result; // eax@7 int v19; // edi@7 int v20; // esi@7 int v21; // [sp+0h] [bp-80h]@1 *(_DWORD *)(a5 - 48) = a4; *(_DWORD *)(a5 - 32) = a6; v7 = 0; *(_DWORD *)(a5 - 8) = a7; v8 = a2; v9 = a1 - 6; *(_DWORD *)(a5 - 40) = a3 - 1; *(_DWORD *)(a5 - 24) = &v21; *(_DWORD *)(a5 - 16) = a5; while ( *(_WORD *)(a2 + v7) ) { --v9; v7 += 2; } v10 = v7 + 2; v11 = sub_1BFD6(v7 + 10, v7, v7 + 2, a2, a3 - 1) - 2; v12 = v11; if ( v11 ) { *(_BYTE *)v11 = 4; *(_BYTE *)(v11 + 1) = 4; *(_BYTE *)(v11 + 2) = v7 + 1; *(_BYTE *)(v11 + 3) = (unsigned __int16)(v7 + 4) >> 8; (*(void (__fastcall **)(int, int))(*(_DWORD *)((char *)&loc_90A3 + 5) + 352))(v11 + 3, v8); v13 = *(_BYTE *)(v12 + 3) << 8; _EDX = v13 | *(_BYTE *)(v12 + 2); v10 = v7; __asm { arpl dx, dx } v15 = v12 + _EDX; *(_BYTE *)v15 = 127; *(_BYTE *)(v15 + 1) = -1; *(_BYTE *)(v15 + 2) = 4; *(_BYTE *)(v15 + 3) = 0; if ( v13 != 2 ) { *(_DWORD *)(v7 - 56) = 0; (*(void (__fastcall **)(int, char *))(v7 - 58 + 152))(v12, (char *)&loc_90AB + 4); sub_1B544(*(_DWORD *)(v7 - 56), v12); (*(void (__fastcall **)(int))(*(_DWORD *)((char *)&loc_90A3 + 5) - 1 + 72))(v12); } } v16 = *(_DWORD *)(v10 - 48); v17 = *(_DWORD *)(v10 - 40); result = (char *)&v21 - 3; v19 = *(_DWORD *)(v10 - 32); v20 = *(_DWORD *)(*(_DWORD *)(v10 - 16) - 8); return result; } //----- (0001B8A5) -------------------------------------------------------- int __fastcall sub_1B8A5(int a1, int a2) { *(_DWORD *)((char *)&loc_9019 - 1) = a2; *(_DWORD *)&loc_9002 = *(_DWORD *)(a2 + 96); *(_DWORD *)((char *)&loc_8FEA + 2) = *(_DWORD *)(a2 + 88); return 0; } //----- (0001BBDD) -------------------------------------------------------- int __usercall sub_1BBDD@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4@<ebx>, int a5@<ebp>, int a6@<edi>, int a7@<esi>) { int v7; // ebx@1 int v8; // esi@1 int v9; // edi@1 int v10; // et1@1 int v11; // esi@1 int v12; // edi@1 *(_DWORD *)(a5 - 24) = a4; *(_DWORD *)(a5 - 16) = a7; v7 = a1 - 4; *(_DWORD *)(a5 - 8) = a6; v8 = a3; v9 = a3; sub_1B8A5(a3, a2); *(_DWORD *)(v7 + 32) = v8; *(_DWORD *)(v7 + 40) = v9; v10 = *(_DWORD *)(a5 - 24); v11 = *(_DWORD *)(a5 - 16); v12 = *(_DWORD *)(a5 - 8 + 1); return (*(int (__fastcall **)(int, int (__cdecl *)(int, unsigned __int8)))(vFFFFFFFF - 1 + 128))(v7 + 1, sub_8D02); } //----- (0001BC39) -------------------------------------------------------- int __usercall sub_1BC39@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4@<ebx>, int a5@<ebp>, int a6@<edi>, int a7@<esi>) { int v7; // esi@1 int v8; // edi@1 int v9; // eax@1 int v10; // ebx@9 int v11; // esi@9 int result; // eax@9 int v13; // edi@9 int v14; // [sp+0h] [bp-60h]@1 void *retaddr; // [sp+64h] [bp+4h]@6 *(_DWORD *)(a5 - 32) = a4; *(_DWORD *)(a5 - 24) = a7; *(_DWORD *)(a5 - 16) = a6; *(_DWORD *)(a5 - 8) = &v14; v7 = *(_DWORD *)(a5 + 48); v8 = *(_DWORD *)(a5 + 56); v9 = sub_1BBDD(a1 - 7, a2, a3, a1 - 4, a5, v8, v7) - 1; if ( v9 >= 0 ) { if ( !v7 || (++a5, v9 = (*(int (__fastcall **)(int, char *))((char *)&dword_74[3] + vFFFFFFFD))(v7, (char *)&loc_8C6F + 4) - 1, v9 >= 0) ) { if ( !v8 || (++a5, v9 = (*(int (__fastcall **)(int, char *))((char *)&dword_74[3] + vFFFFFFFD))(v8, (char *)&loc_8C77 + 1) - 1, v9 >= 0) ) { --a5; if ( !&retaddr || (v9 = (*(int (__fastcall **)(void **, _UNKNOWN *))((char *)&dword_74[3] + vFFFFFFFD))(&retaddr, &loc_8C5D) - 1, v9 >= 0) ) v9 = 0; } } } v10 = *(_DWORD *)(a5 - 32); v11 = *(_DWORD *)(a5 - 24); result = v9 - 3; v13 = *(_DWORD *)(a5 - 16); return result; } // 74: using guessed type int dword_74[13]; //----- (0001BE85) -------------------------------------------------------- int __fastcall sub_1BE85(int a1) { int v1; // ecx@1 (*(void (__fastcall **)(signed int, int))(*(_DWORD *)((char *)&loc_8A25 + 1) + 64))(4, a1); v1 = 0; return v1 - 1; } //----- (0001BEED) -------------------------------------------------------- int __fastcall sub_1BEED(int a1) { int v1; // ecx@1 (*(void (__fastcall **)(signed int, int))(loc_89BE + 64))(6, a1); v1 = 0; return v1 - 1; } //----- (0001BFD6) -------------------------------------------------------- int __usercall sub_1BFD6@<eax>(int a1@<ecx>, int a2@<ebx>, int a3@<ebp>, int a4@<edi>, int a5@<esi>) { int v5; // edi@1 int v6; // ebx@1 int v7; // esi@3 int v8; // eax@3 int v9; // ebx@3 int result; // eax@3 int v11; // edi@3 *(_DWORD *)(a3 - 16) = a5; *(_DWORD *)(a3 - 24) = a2; *(_DWORD *)(a3 - 8) = a4; v5 = a1; *(_DWORD *)(a3 - 40) = 0; (*(void (__fastcall **)(signed int, int))(loc_88D2 + 64))(4, a1); v6 = *(_DWORD *)(a3 - 40); if ( v6 ) { ++a3; (*(void (__fastcall **)(int, int))((char *)&dword_158[3] + 2))(v6, v5); } v7 = *(_DWORD *)(a3 - 16); v8 = v6 - 2; v9 = *(_DWORD *)(a3 - 24); result = v8 - 1; v11 = *(_DWORD *)(a3 - 8); return result; } // 158: using guessed type int dword_158[20]; // 166: using guessed type int (__fastcall *)(_DWORD, _DWORD); //----- (0001CA08) -------------------------------------------------------- void __usercall sub_1CA08(char a1@<al>) { JUMPOUT(__CS__, (char *)&(&off_29)[-4 * (unsigned __int8)(a1 - 2)] + 1); } // 29: using guessed type __int16 *; //----- (0001CCFC) -------------------------------------------------------- void __usercall sub_1CCFC(char a1@<al>, int a2@<edx>, int a3@<ecx>) { __int16 v3; // [sp+2B6h] [bp-D2h]@1 int v4; // [sp+2E0h] [bp-A8h]@1 int v5; // [sp+2E8h] [bp-A0h]@1 int v6; // [sp+2F0h] [bp-98h]@1 v4 = a2; v5 = 4 * (unsigned __int8)(a1 - 4) - 1; v6 = a3; JUMPOUT(__CS__, &unk_44 - (_UNKNOWN *)&v3); } //----- (0001CED1) -------------------------------------------------------- int __fastcall sub_1CED1(int a1, int a2) { int result; // eax@3 while ( 1 ) { result = *(_WORD *)a2; if ( !(_WORD)result ) break; *(_WORD *)a1 = result; a2 += 2; a1 += 2; } *(_WORD *)a1 = 0; return result; } //----- (0001CEF1) -------------------------------------------------------- signed int __fastcall sub_1CEF1(int a1) { signed int result; // eax@1 result = -1; while ( *(_WORD *)(a1 - 2) ) ; return result; } //----- (0001CF05) -------------------------------------------------------- int __fastcall sub_1CF05(int a1, int a2) { __int16 v2; // ax@4 while ( 1 ) { v2 = *(_WORD *)a1; if ( !*(_WORD *)a1 || v2 != *(_WORD *)a2 ) break; a1 += 2; a2 += 2; } return (signed __int16)(v2 - *(_WORD *)a2 - 1); } //----- (0001CF6E) -------------------------------------------------------- signed int __fastcall sub_1CF6E(int a1) { signed int result; // eax@1 result = -1; while ( *(_BYTE *)(a1 - 1) ) ; return result; } //----- (0001CF81) -------------------------------------------------------- int __fastcall sub_1CF81(int a1, int a2) { while ( *(_BYTE *)a2 ) *(_BYTE *)a1++ = *(_BYTE *)a2++; *(_BYTE *)a1 = 0; return a1 + 1; } //----- (0001D14A) -------------------------------------------------------- signed int __fastcall sub_1D14A(int a1) { while ( *(_WORD *)(a1 - 2) ) ; return -2; } //----- (0001D32B) -------------------------------------------------------- int __fastcall sub_1D32B(int a1, int a2) { int i; // ecx@2 int result; // eax@4 while ( *(_WORD *)(a1 - 2) ) ; for ( i = a1 - 4; ; i += 2 ) { result = *(_WORD *)a2; if ( !(_WORD)result ) break; *(_WORD *)i = result; a2 += 2; } *(_WORD *)i = 0; return result; } #error "There were 1 decompilation failure(s) on 145 function(s)" is MLB.efi decoded with IDA pro. (one error encountered so is not complete) 2 Link to comment Share on other sites More sharing options...
HBP Posted September 23, 2015 Share Posted September 23, 2015 having struggled with resolving the call Apple issue again with El capitan having used my macbook's Rom and MLB for Yosemite I found this floating on Reddit. hope it helps the folks having issues... https://gist.github.com/theracermaster/b6a9db46b14061d4c995 I have used it to gen MLB's for 3 hacks that have passed muster without needing to call, write or beg Apple to remember that we exist. HBP 1 Link to comment Share on other sites More sharing options...
TheRacerMaster Posted September 28, 2015 Share Posted September 28, 2015 having struggled with resolving the call Apple issue again with El capitan having used my macbook's Rom and MLB for Yosemite I found this floating on Reddit. hope it helps the folks having issues... https://gist.github.com/theracermaster/b6a9db46b14061d4c995 I have used it to gen MLB's for 3 hacks that have passed muster without needing to call, write or beg Apple to remember that we exist. HBP Ah yes, this is just a simple ({censored}) script I wrote. It's kinda out of date and some of the values are simply randomly generated, but Apple doesn't really care if the MLB is not 100% accurate. Nice to hear it works for you. Perhaps I should update it soon. 2 Link to comment Share on other sites More sharing options...
Hanger1(H1) Posted September 29, 2015 Share Posted September 29, 2015 Ah yes, this is just a simple ({censored}) script I wrote. It's kinda out of date and some of the values are simply randomly generated, but Apple doesn't really care if the MLB is not 100% accurate. Nice to hear it works for you. Perhaps I should update it soon. Is this code written by you ? OMG Link to comment Share on other sites More sharing options...
wegface Posted September 29, 2015 Share Posted September 29, 2015 # Based off the work of Hanger1, AGuyWhoIsBored & Alien:X Well, Hanger1 was Alien:X, but is now wolfmannightNotH1AX 1 Link to comment Share on other sites More sharing options...
TheRacerMaster Posted September 29, 2015 Share Posted September 29, 2015 # Based off the work of Hanger1, AGuyWhoIsBored & Alien:X Well, Hanger1 was Alien:X, but is now wolfmannightNotH1AX Oops... didn't know that. Will update credits. Is this code written by you ? OMG Yes, was a simple script I wrote, heavily based off your MLBGen scripts (thanks, great work BTW), I just made some changes like reading some values from the SN (instead of randomly generating them) and also an option to print info about the input SN. 1 Link to comment Share on other sites More sharing options...
Hanger1(H1) Posted October 1, 2015 Share Posted October 1, 2015 If anyone wants take a look: /* This file has been generated by the Hex-Rays decompiler. Copyright (c) 2007-2014 Hex-Rays <info@hex-rays.com> Detected compiler: Unknown */ #include <defs.h> //------------------------------------------------------------------------- // Function declarations int __cdecl sub_1641(int a1, int a2); int __cdecl sub_1849(int a1, int a2); signed int __cdecl sub_1BAC(int a1); signed int sub_23C4(); signed int sub_2D22(); int __cdecl sub_2F3A(int a1); int __cdecl sub_30A3(int a1); int __cdecl sub_31EB(int a1); int __cdecl sub_3392(int a1, int a2, int a3, unsigned int a4); int __cdecl sub_3E75(int a1); bool __cdecl sub_412E(int a1); signed int __cdecl sub_48DC(int a1); int __cdecl sub_4E73(int a1, int a2); int __cdecl sub_4EA0(int a1); int __cdecl sub_4EC6(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8); int __cdecl sub_4F1D(int a1, int a2); int __cdecl sub_4F4A(int a1, int a2); int __cdecl sub_4F77(int a1); int __cdecl sub_4F9D(int a1, int a2, int a3, int a4, __int16 a5, int a6, __int16 a7); int __cdecl sub_4FF8(int a1); int __cdecl sub_51CE(int a1, int a2, int a3, int a4); int __cdecl sub_54CB(int a1, int a2); int sub_59A8(); // weak int sub_5F32(); // weak int __cdecl sub_5FAF(int a1, int a2, int a3, int a4, char a5); int __cdecl sub_61E8(int a1, int a2, int a3, int a4, int a5, int a6); int __cdecl sub_6234(int a1, int a2, int a3, int a4); int __cdecl sub_64C8(char a1, int a2, int a3, int a4, int a5); int __cdecl sub_6511(char a1, int a2, int a3, int a4, unsigned __int8 a5); int sub_6561(); int __cdecl sub_683B(int a1, int a2, int a3); int __cdecl sub_6893(int a1, int a2, int a3); int __cdecl sub_6987(unsigned __int8 a1, int a2); int __cdecl sub_6BCE(int a1, int a2); int __cdecl sub_6C92(int a1, int a2); int __cdecl sub_6CC2(int a1, unsigned __int8 a2); int __cdecl sub_6D34(int a1, int a2); int __cdecl sub_6EC6(int a1, int a2, int a3); int __cdecl sub_6EFD(int a1, int a2, char a3); int __cdecl sub_6F24(int a1, int a2); int __cdecl sub_6F8B(int a1, int a2); int __cdecl sub_7034(int a1); int sub_7AE2(); // weak int sub_7B34(); int __cdecl sub_7C00(int a1, int a2, unsigned int a3); int __cdecl sub_7E67(int a1, char a2, int a3); signed int __cdecl sub_80C5(int a1, int a2); signed int __cdecl sub_8252(int a1); signed int sub_830D(); signed int __cdecl sub_849A(int a1, int a2, int a3, char a4); signed int __cdecl sub_8AD4(int a1, int a2, int a3); int __cdecl sub_8CBD(int a1, unsigned __int8 a2); int __cdecl sub_8D02(int a1, unsigned __int8 a2); // void __usercall sub_92D9(int a1@<ebp>); int __cdecl sub_9DAC(int a1); int __cdecl sub_9E8A(int a1); int __cdecl sub_9F6C(int a1, int a2); int __cdecl sub_A03E(int a1, int a2); int __cdecl sub_A1CB(int a1, int a2); int __cdecl sub_A2BD(int a1, int a2); signed int __cdecl sub_A539(int a1, int a2, int a3, int a4); int __cdecl sub_A5CB(int a1, int a2, int a3, int a4); int __cdecl sub_A634(int a1, int a2, int a3, int a4, int a5, int a6, int a7); int sub_A762(); // weak int __cdecl sub_A82A(int a1); int sub_A874(); // weak int __cdecl sub_A8A4(int a1, int a2); int __cdecl sub_A90D(int a1, int a2); int __cdecl sub_AA03(int a1); int __cdecl sub_AA70(int a1, unsigned int a2, int a3, unsigned int *a4); int __cdecl sub_B3BF(int a1, int a2, int a3, char a4); int __cdecl sub_B563(int a1, char a2); signed int __cdecl sub_B631(int a1, int a2); int __cdecl sub_B65D(int a1, int a2); int __cdecl sub_B680(int a1); int __cdecl sub_B694(unsigned __int16 *a1, int a2); int __cdecl sub_B708(int a1); int __cdecl sub_B71B(int a1, int a2); int sub_B7E8(); // weak int __cdecl sub_B8EA(int a1); int __cdecl sub_BACB(int a1, int a2); int __cdecl sub_BC21(int a1, unsigned int a2, unsigned int a3, char a4, unsigned int a5); int __cdecl sub_BCF9(int a1, int a2, int a3, unsigned int a4, unsigned int a5); unsigned __int64 __cdecl sub_BEC7(unsigned __int64 a1, char a2); unsigned __int64 __cdecl sub_BEE3(unsigned __int64 a1, unsigned int a2, int a3); unsigned __int64 __cdecl sub_BFD0(unsigned __int64 a1, unsigned int a2, unsigned int a3); int __cdecl sub_C120(unsigned __int64 a1, __int64 a2); int __fastcall sub_12590(int a1, int a2); // int __usercall sub_14282@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4@<ebp>); int *__fastcall sub_14DDA(int a1); bool __fastcall sub_1510C(int a1); // int __usercall sub_1590E@<eax>(int a1@<ecx>, unsigned int a2@<ebx>, int a3@<edi>, int a4@<esi>); int sub_15E60(); int sub_15E87(); int __fastcall sub_15EA6(int a1, int (__fastcall *a2)(_DWORD)); int sub_15F09(); int sub_15F2E(); int sub_15F58(); int __fastcall sub_15F7A(int a1); int sub_15FD3(); int __fastcall sub_161FA(int a1); unsigned int __fastcall sub_164EA(int a1, int a2); // void __usercall sub_16F2C(char a1@<al>, int a2, int a3, int a4, int a5, int a6, int a7, int a8); int __fastcall sub_173E1(int a1); int __fastcall sub_17431(char *a1); int __fastcall sub_176AC(char a1); int __fastcall sub_176FE(char a1); int sub_17755(); // int __usercall sub_179D7@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4, int a5, int a6, __int64 a7); // int __usercall sub_17A4E@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4, int a5, int a6, __int64 a7); int __fastcall sub_17B43(unsigned __int8 a1); int __fastcall sub_17D51(int a1, int a2); int sub_17E2E(); int __fastcall sub_17E56(int a1, char a2); int __fastcall sub_17EEE(int a1, int a2); int __fastcall sub_180A8(int a1); // void __usercall sub_180DE(char a1@<al>, int a2, int a3, int a4); int sub_181AF(); int __fastcall sub_1820F(int a1, int a2); int __fastcall sub_182C1(int a1); int sub_19028(); // int __usercall sub_190F8@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, unsigned int _EBX@<ebx>); // int __usercall sub_1937A@<eax>(int a1@<eax>, char a2@<dl>, int a3@<ecx>); signed int __fastcall sub_19600(int a1, int a2); int __fastcall sub_1978E(int a1); signed int sub_1984E(); // signed int __usercall sub_199DA@<eax>(int a1@<eax>, int a2@<edx>, int (__fastcall *a3)(_DWORD)@<ecx>, unsigned int a4@<ebx>, int a5@<edi>, int a6@<esi>); // int __usercall sub_1A04A@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4, int a5, int a6, int a7, int a8, int a9, int a10); int __fastcall sub_1A263(int a1); int __fastcall sub_1A2A9(int a1); int __fastcall sub_1B38D(int a1); int __fastcall sub_1B44F(int a1); int __fastcall sub_1B544(int a1, int a2); int __fastcall sub_1B60F(int a1, int a2); // char *__usercall sub_1B7A2@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4@<ebx>, int a5@<ebp>, int a6@<edi>, int a7@<esi>); int __fastcall sub_1B8A5(int a1, int a2); // int __usercall sub_1BBDD@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4@<ebx>, int a5@<ebp>, int a6@<edi>, int a7@<esi>); // int __usercall sub_1BC39@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4@<ebx>, int a5@<ebp>, int a6@<edi>, int a7@<esi>); int __fastcall sub_1BE85(int a1); int __fastcall sub_1BEED(int a1); // int __usercall sub_1BFD6@<eax>(int a1@<ecx>, int a2@<ebx>, int a3@<ebp>, int a4@<edi>, int a5@<esi>); // void __usercall sub_1CA08(char a1@<al>); // void __usercall sub_1CCFC(char a1@<al>, int a2@<edx>, int a3@<ecx>); int __fastcall sub_1CED1(int a1, int a2); signed int __fastcall sub_1CEF1(int a1); int __fastcall sub_1CF05(int a1, int a2); signed int __fastcall sub_1CF6E(int a1); int __fastcall sub_1CF81(int a1, int a2); signed int __fastcall sub_1D14A(int a1); int __fastcall sub_1D32B(int a1, int a2); //------------------------------------------------------------------------- // Data declarations _UNKNOWN unk_0; // weak _UNKNOWN loc_1; // weak _UNKNOWN loc_4; // weak _UNKNOWN loc_7; // weak char byte_9[3] = { '\0', '\0', '\0' }; // weak _UNKNOWN unk_C; // weak int (*off_15)[6] = &dword_10C; // weak _UNKNOWN unk_20; // weak __int16 *off_29 = &word_146; // weak void *off_37 = (void *)0x400; // weak _UNKNOWN unk_3B; // weak _UNKNOWN unk_3C; // weak _UNKNOWN unk_40; // weak _UNKNOWN unk_44; // weak _UNKNOWN unk_48; // weak int dword_4C[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; // weak int dword_74[13] = { 3439965184, 1275181089, 1750344141, 1881174889, 1919381362, 1663069537, 1869508193, 1700929652, 1853190688, 544106784, 542330692, 1701080941, 168627502 }; // weak int dword_124[8] = { 16, 0, 0, 0, 0, 0, 0, 0 }; // weak int dword_158[20] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak _UNKNOWN unk_230; // weak int dword_244[4] = { 3758096416, 1952539694, 97, 0 }; // weak _UNKNOWN loc_5FE; // weak char *off_1878 = &byte_AB; // weak _UNKNOWN loc_4EA7; // weak _UNKNOWN loc_570E; // weak _UNKNOWN loc_5794; // weak _UNKNOWN loc_5E0D; // weak _UNKNOWN loc_5EF6; // weak _UNKNOWN loc_6015; // weak _UNKNOWN loc_6162; // weak _UNKNOWN loc_82C0; // weak _UNKNOWN loc_82CC; // weak _UNKNOWN loc_82E8; // weak _UNKNOWN loc_8304; // weak _UNKNOWN loc_835C; // weak _UNKNOWN loc_8399; // weak _UNKNOWN loc_83A9; // weak _UNKNOWN loc_83BD; // weak _UNKNOWN loc_88D2; // weak _UNKNOWN loc_89BE; // weak _UNKNOWN loc_8A25; // weak _UNKNOWN loc_8C5D; // weak _UNKNOWN loc_8C6F; // weak _UNKNOWN loc_8C77; // weak _UNKNOWN loc_8FEA; // weak _UNKNOWN loc_9002; // weak _UNKNOWN loc_9019; // weak _UNKNOWN loc_90A3; // weak _UNKNOWN loc_90AB; // weak _UNKNOWN loc_923D; // weak char algn_9429[3] = { '\x0F', '\x1F', '\0' }; // weak _UNKNOWN loc_94FE; // weak _UNKNOWN loc_953F; // weak _UNKNOWN loc_970F; // weak _UNKNOWN loc_97BA; // weak _UNKNOWN loc_A6A0; // weak _UNKNOWN loc_A6EC; // weak _UNKNOWN loc_A7FD; // weak _UNKNOWN loc_A84D; // weak _UNKNOWN loc_A8C6; // weak _UNKNOWN loc_AAAE; // weak _UNKNOWN loc_AAC3; // weak _UNKNOWN loc_AAE5; // weak void *off_AB14[77] = { &off_1E5, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, (void *)0x209, (void *)0x1D9, (void *)0x1F1, (void *)0x1CD, &off_254, &off_254, &unk_21D, &unk_224, &unk_224, &unk_224, &unk_224, &unk_224, &unk_224, &unk_224, &unk_224, &unk_224, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, (void *)0x1FD, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, &off_254, (void *)0x1FD }; // weak _UNKNOWN loc_AC4F; // weak _UNKNOWN loc_ACB4; // weak _UNKNOWN loc_ACE1; // weak void *off_ACEC[84] = { (void *)0x8E3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x4E9, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, &loc_3C1, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, &loc_567, (void *)0x8F3, (void *)0x5E2, (void *)0x459, (void *)0x8F3, (void *)0x8F3, &loc_5FE, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x6EA, (void *)0x4E9, (void *)0x68D, (void *)0x8F3, (void *)0x8F3, (void *)0x8F3, (void *)0x3CF }; // weak _UNKNOWN loc_AE63; // weak _UNKNOWN loc_AE69; // weak _UNKNOWN loc_AEC7; // weak _UNKNOWN loc_AF6D; // weak _UNKNOWN loc_AFA7; // weak _UNKNOWN loc_AFCF; // weak _UNKNOWN loc_B039; // weak _UNKNOWN loc_B0A3; // weak _UNKNOWN loc_B103; // weak _UNKNOWN loc_B297; // weak _UNKNOWN loc_B301; // weak _UNKNOWN loc_B36E; // weak _UNKNOWN loc_B3D9; // weak _UNKNOWN loc_B410; // weak _UNKNOWN loc_B477; // weak _UNKNOWN loc_B640; // weak _UNKNOWN loc_B6A2; // weak _UNKNOWN loc_B6D2; // weak _UNKNOWN loc_B731; // weak _UNKNOWN loc_B7EB; // weak _UNKNOWN loc_B837; // weak _UNKNOWN loc_B886; // weak int dword_C3B2 = 0; // weak int dword_C3B8[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak char byte_C3F9[3] = { '\0', '\0', '\0' }; // weak __int16 word_C3FE = 0; // weak int dword_C404[14] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak __int16 word_C43E = 0; // weak int dword_C444[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak int dword_C474[6] = { 0, 0, 0, 0, 0, 0 }; // weak int dword_C6A4[111] = { 670309, 1681010725, 540876858, 807761968, 807761970, 622884914, 628634160, 544748080, 2016555045, 2016555045, 842016032, 842016120, 2680, 1953719636, 1887007776, 1868963941, 1634476146, 1176532083, 1914721347, 1998614133, 622883681, 173551920, 1414743296, 1280114783, 21058, 1330795077, 1397039186, 1701519444, 2019893369, 1937011561, 1953849888, 544434464, 544501614, 561276275, 10, 1197425744, 1631876197, 540696948, 1380076621, 622869792, 1696607332, 540701298, 1814394928, 673216620, 1814394928, 170489964, 1112296704, 1701519442, 1936269433, 1953459744, 1952805664, 10, 1819635523, 1948741220, 1952802592, 1112296736, 1701519442, 1953702009, 1937077345, 1951606816, 1937077345, 628633661, 695744560, 1280114698, 1797280322, 1763735909, 1702043763, 1869881460, 667680, 1380076621, 2036689696, 544434464, 544499059, 824209268, 1160183818, 660558931, 2036689696, 544434464, 544499059, 824209268, 10, 1414743335, 1797269343, 1763735909, 1869488243, 1702043764, 1919885428, 1952805664, 544175136, 2608, 1330795077, 1280122962, 1699881026, 1667329136, 1109419109, 1025537129, 744760608, 1414743328, 1953055264, 622869792, 2660, 1330795077, 1397039186, 1701519444, 1634214009, 1330520179, 1700929620, 1663069797, 1918985580, 169960549, 0 }; // weak char byte_CB71[3] = { '0', '0', '0' }; // weak char byte_CB79[3] = { '0', '2', 'x' }; // weak int dword_CB84[4] = { 2112120, 536879136, 2105376, 1769104723 }; // weak char byte_CBFB = '\0'; // weak int dword_CCC4[5] = { 1953460066, 1952542765, 1931804776, 7546173, 1953396050 }; // weak _UNKNOWN unk_CCDB; // weak int dword_CD14[254] = { 1684107116, 1986622020, 690516581, 10, 1869377109, 1852400737, 1919164519, 1919252073, 1936467232, 10, 1869377109, 1917084769, 1919252073, 1663052072, 1819307375, 1684370533, 1953703968, 1937077345, 2015699002, 1006635561, 1819047278, 1920234272, 1046965865, 1668633344, 1936942435, 1634683904, 1917132900, 7499634, 1635151433, 543451500, 1634885968, 1702126957, 1851064434, 1886418291, 1702130287, 1631715428, 1967267940, 1919247974, 2053722912, 1967259749, 1919247974, 1869567008, 1634554656, 1308650604, 1377858671, 2036621669, 1986348032, 543515497, 1869771333, 1918304370, 543519849, 1953460816, 1702126437, 1968111716, 1718558836, 1936020000, 1668445551, 1442870117, 1836412015, 1866670181, 1886745202, 1867907188, 1701672300, 1819624992, 1867382892, 1684360480, 1291870569, 1634296933, 1634231072, 1684367214, 1953451520, 1970226720, 1090544750, 1936024419, 1698963571, 1684367726, 544165376, 1886610770, 1702063727, 544165376, 1886413165, 6778473, 1701669204, 1953853216, 1953451520, 1635021600, 1684370546, 1919697152, 2036621669, 1635021600, 1684370546, 1868710144, 1684370546, 1296255232, 1917132880, 7499634, 1347700308, 1920091424, 1342206575, 1869901682, 543977315, 1869771333, 1633091698, 1852403314, 1851072615, 2003791467, 1816600686, 6844537, 1852989783, 543649385, 1701602628, 1176528244, 1970039137, 1459643762, 1768845921, 1461741422, 1702127986, 1767982624, 1701999980, 1918981888, 1735289198, 1718960672, 544367974, 544173908, 1818324307, 108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak __int16 aRifyIctWasRunA[28] = { 114, 105, 102, 121, 32, 73, 67, 84, 32, 87, 97, 115, 32, 82, 117, 110, 32, 65, 110, 100, 32, 80, 97, 115, 115, 101, 100, 0 }; // weak __int16 aRifyIctWasRu_0[44] = { 114, 105, 102, 121, 32, 73, 67, 84, 32, 119, 97, 115, 32, 114, 117, 110, 32, 97, 110, 100, 32, 108, 97, 115, 116, 32, 105, 116, 101, 114, 97, 116, 105, 111, 110, 32, 112, 97, 115, 115, 101, 100, 46, 0 }; // weak int dword_D1AC[8] = { 2621440, 7077987, 7536737, 3997811, 5046306, 4325452, 2687010, 0 }; // weak __int16 aRifyEstBitSetT[22] = { 114, 105, 102, 121, 32, 69, 83, 84, 32, 66, 105, 116, 32, 83, 101, 116, 32, 84, 101, 115, 116, 0 }; // weak __int16 aRifyTheExtende[43] = { 114, 105, 102, 121, 32, 84, 104, 101, 32, 69, 120, 116, 101, 110, 100, 101, 100, 32, 83, 101, 114, 118, 105, 99, 101, 32, 84, 101, 115, 116, 32, 66, 105, 116, 32, 105, 115, 32, 115, 101, 116, 46, 0 }; // weak _UNKNOWN unk_DD00; // weak _UNKNOWN off_DD50; // weak _UNKNOWN unk_E01C; // weak __int16 aSetmlbreplaced[15] = { 83, 101, 116, 77, 76, 66, 82, 101, 112, 108, 97, 99, 101, 100, 0 }; // weak int dword_E045 = 1107315712; // weak __int16 aGetrtcramsize[14] = { 71, 101, 116, 82, 84, 67, 82, 97, 109, 83, 105, 122, 101, 0 }; // weak _UNKNOWN unk_E06C; // weak __int16 aNdleprotocolEr[26] = { 110, 100, 108, 101, 80, 114, 111, 116, 111, 99, 111, 108, 32, 69, 114, 114, 111, 114, 58, 32, 48, 120, 37, 120, 10, 0 }; // weak __int16 a16450Compatabl[30] = { 49, 54, 52, 53, 48, 32, 99, 111, 109, 112, 97, 116, 97, 98, 108, 101, 32, 83, 101, 114, 105, 97, 108, 32, 80, 111, 114, 116, 10, 0 }; // weak __int16 a16550Compatabl[30] = { 49, 54, 53, 53, 48, 32, 99, 111, 109, 112, 97, 116, 97, 98, 108, 101, 32, 83, 101, 114, 105, 97, 108, 32, 80, 111, 114, 116, 10, 0 }; // weak __int16 aDirectionalPar[28] = { 45, 100, 105, 114, 101, 99, 116, 105, 111, 110, 97, 108, 32, 112, 97, 114, 97, 108, 108, 101, 108, 32, 112, 111, 114, 116, 10, 0 }; // weak __int16 aBaseSystemPeri[29] = { 32, 32, 32, 66, 97, 115, 101, 32, 83, 121, 115, 116, 101, 109, 32, 80, 101, 114, 105, 112, 104, 101, 114, 97, 108, 115, 44, 32, 0 }; // weak __int16 aNeric8259Progr[38] = { 110, 101, 114, 105, 99, 32, 56, 50, 53, 57, 32, 80, 114, 111, 103, 114, 97, 109, 109, 98, 108, 101, 32, 73, 110, 116, 101, 114, 114, 117, 112, 116, 32, 67, 111, 110, 116, 114 }; // weak __int16 aOgrammableInte[33] = { 111, 103, 114, 97, 109, 109, 97, 98, 108, 101, 32, 73, 110, 116, 101, 114, 114, 117, 112, 116, 32, 67, 111, 110, 116, 114, 111, 108, 108, 101, 114, 10, 0 }; // weak _UNKNOWN unk_EAE6; // weak __int16 aNeric8237DmaCo[27] = { 110, 101, 114, 105, 99, 32, 56, 50, 51, 55, 32, 68, 77, 65, 32, 99, 111, 110, 116, 114, 111, 108, 108, 101, 114, 10, 0 }; // weak __int16 aNtium[7] = { 110, 116, 105, 117, 109, 10, 0 }; // weak _UNKNOWN unk_EDBB; // weak __int16 aSerialBusContr[27] = { 32, 32, 32, 83, 101, 114, 105, 97, 108, 32, 66, 117, 115, 32, 67, 111, 110, 116, 114, 111, 108, 108, 101, 114, 44, 32, 0 }; // weak __int16 aRewireIeee1394[19] = { 114, 101, 119, 105, 114, 101, 40, 73, 69, 69, 69, 32, 49, 51, 57, 52, 41, 10, 0 }; // weak __int16 a8x04x04x02x02x[47] = { 56, 120, 45, 37, 48, 52, 120, 45, 37, 48, 52, 120, 45, 37, 48, 50, 120, 37, 48, 50, 120, 45, 37, 48, 50, 120, 37, 48, 50, 120, 37, 48, 50, 120, 37, 48, 50, 120, 37, 48, 50, 120, 37, 48, 50, 120, 0 }; // weak int dword_EF40[20] = { 2424832, 88, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak int dword_EF90[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak int dword_EFB4 = 0; // weak int dword_EFBC[4] = { 0, 0, 0, 0 }; // weak int dword_EFCC = 0; // weak int dword_EFD0[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak int dword_F010[48] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak int dword_F0D0[32] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak int dword_F150[21] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak _UNKNOWN unk_F6B8; // weak int dword_FA94[104] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak int dword_FC3C[2] = { 0, 0 }; // weak int dword_FC44[2] = { 0, 0 }; // weak int dword_FC74[3] = { 0, 0, 0 }; // weak int dword_10000[640] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // weak _UNKNOWN unk_10C3E; // weak //----- (00001641) -------------------------------------------------------- int __cdecl sub_1641(int a1, int a2) { int result; // eax@1 _EAX = a1; __asm { cpuid } *(_DWORD *)a2 = _EAX; *(_DWORD *)(a2 + 4) = _EBX; result = a2 + 8; *(_DWORD *)(a2 + 8) = _ECX; *(_DWORD *)(a2 + 12) = _EDX; return result; } //----- (00001849) -------------------------------------------------------- int __cdecl sub_1849(int a1, int a2) { int v3; // [sp+28h] [bp-10h]@3 int v4; // [sp+2Ch] [bp-Ch]@3 if ( (unsigned int)a2 <= 7 ) JUMPOUT(__CS__, (&off_1878)[4 * a2] + 6229); (*(void (__cdecl **)(int, signed int, int *))(a1 + 12))(a1, 1296843359, &v3); if ( v4 >= 0 ) sub_61E8(1296843359, v3, a2, v4, 0, 0); else sub_6234(1296843359, v3, a2, v4); return v4; } // 1878: using guessed type char *off_1878; //----- (00001BAC) -------------------------------------------------------- signed int __cdecl sub_1BAC(int a1) { char v1; // ST14_1@9 int v2; // ST34_4@10 int v3; // ST30_4@10 int v4; // ST2C_4@10 int v5; // ST28_4@10 int v6; // ST24_4@10 int v7; // ST20_4@10 int v8; // ST1C_4@10 int v9; // ST18_4@10 unsigned __int64 v10; // rax@17 signed int v12; // [sp+5Ch] [bp-8Ch]@3 unsigned __int64 v13; // [sp+78h] [bp-70h]@5 char v14[32]; // [sp+86h] [bp-62h]@7 unsigned __int16 v15; // [sp+A6h] [bp-42h]@1 char v16; // [sp+A9h] [bp-3Fh]@1 __int16 v17; // [sp+AAh] [bp-3Eh]@1 char v18; // [sp+ACh] [bp-3Ch]@2 int v19; // [sp+BCh] [bp-2Ch]@1 int v20; // [sp+C0h] [bp-28h]@1 int v21; // [sp+C4h] [bp-24h]@1 char v22; // [sp+CBh] [bp-1Dh]@1 unsigned int i; // [sp+CCh] [bp-1Ch]@9 v20 = 0; v22 = 2; (*(void (__cdecl **)(int, signed int, int *))(a1 + 12))(a1, 1296843359, &v19); v17 = 2; v21 = sub_64C8(v22, (int)&dword_C3B2, (int)&v15, (int)&v17, (int)&v16); if ( v21 >= 0 ) { v17 = 8; v21 = sub_64C8(v22, (int)&word_C3FE, (int)&v13, (int)&v17, (int)&v16); if ( v21 >= 0 ) { v17 = 32; v21 = sub_64C8(v22, (int)&word_C43E, (int)v14, (int)&v17, (int)&v16); if ( v21 >= 0 ) { sub_5FAF(1296843359, 1480868423, v19, (int)dword_C474, v15); sub_5FAF(1296843359, 1480868423, v19, (int)"cate the SmcIo Protocol\n", v1); for ( i = 0; i <= 0x1F; i += 8 ) { v2 = (unsigned __int8)v14[i + 7]; v3 = (unsigned __int8)v14[i + 6]; v4 = (unsigned __int8)v14[i + 5]; v5 = (unsigned __int8)v14[i + 4]; v6 = (unsigned __int8)v14[i + 3]; v7 = (unsigned __int8)v14[i + 2]; v8 = (unsigned __int8)v14[i + 1]; v9 = (unsigned __int8)v14[i]; sub_5FAF(1296843359, 1480868423, v19, (int)"Io Protocol\n", i); } if ( v15 > 0x40u ) v15 = 64; if ( v15 & 1 ) sub_5FAF(1296843359, 1481856065, v19, (int)"dge\n", (unsigned __int8)v14[(v15 - 1) / 2] >> 4); else sub_5FAF(1296843359, 1481856065, v19, (int)"dge\n", v14[(v15 - 1) / 2] & 0xF); v10 = v13 >> ((64 - v15) & 0x1F); if ( (64 - (_BYTE)v15) & 0x20 ) LOBYTE(v10) = v13 >> ((64 - v15) & 0x1F) >> 32; if ( v10 & 1 ) v20 = 0; else v20 = 1073741846; v12 = v20; } else { sub_5FAF(1296843359, 1480938066, v19, (int)dword_C444, v21); v12 = 1073741826; } } else { sub_5FAF(1296843359, 1480938066, v19, (int)dword_C404, v21); v12 = 1073741826; } } else { sub_5FAF(1296843359, 1481856065, v19, (int)dword_C3B8, v21); v17 = 16; v21 = sub_64C8(v22, (int)byte_C3F9, (int)&v18, (int)&v17, (int)&v16); if ( v21 >= 0 ) v12 = v20; else v12 = 1073741826; } return v12; } // C3B2: using guessed type int dword_C3B2; // C3B8: using guessed type int dword_C3B8[16]; // C3FE: using guessed type __int16 word_C3FE; // C404: using guessed type int dword_C404[14]; // C43E: using guessed type __int16 word_C43E; // C444: using guessed type int dword_C444[12]; // C474: using guessed type int dword_C474[6]; // 1BAC: using guessed type char var_62[32]; //----- (000023C4) -------------------------------------------------------- signed int sub_23C4() { int v2; // [sp+30h] [bp-38h]@1 char v3; // [sp+36h] [bp-32h]@1 __int16 v4; // [sp+46h] [bp-22h]@2 char v5; // [sp+48h] [bp-20h]@2 char v6; // [sp+49h] [bp-1Fh]@2 char v7; // [sp+4Ah] [bp-1Eh]@2 int v8; // [sp+58h] [bp-10h]@1 char v9; // [sp+5Eh] [bp-Ah]@1 unsigned __int8 v10; // [sp+5Fh] [bp-9h]@2 v8 = 0; v9 = 2; v2 = 16; v8 = (*(int (__cdecl **)(_DWORD, int, _DWORD, int *, char *))(unk_0 + 48))(L"ailed", dword_FC3C[0], 0, &v2, &v3); if ( v8 < 0 ) { if ( v8 == -2147483634 ) return -2147483622; return v8; } v5 = 1; v6 = -2; v7 = 0; v4 = 2; v8 = sub_6511(v9, (int)byte_C3F9, (int)&v5, (int)&v4, v10); if ( v8 >= 0 ) { v8 = sub_6561(); if ( v8 < 0 ) return v8; return v8; } return v8; } // DCAC: using guessed type __int16 aAiled[6]; // FC3C: using guessed type int dword_FC3C[2]; //----- (00002D22) -------------------------------------------------------- signed int sub_2D22() { int v0; // ST24_4@23 signed int v2; // [sp+Ch] [bp-2Ch]@3 __int16 v3; // [sp+1Eh] [bp-1Ah]@4 __int16 v4; // [sp+1Eh] [bp-1Ah]@11 __int16 v5; // [sp+1Eh] [bp-1Ah]@18 __int16 v6; // [sp+1Eh] [bp-1Ah]@25 int v7; // [sp+24h] [bp-14h]@1 unsigned int i; // [sp+28h] [bp-10h]@4 unsigned int j; // [sp+28h] [bp-10h]@11 unsigned int k; // [sp+28h] [bp-10h]@18 unsigned int l; // [sp+28h] [bp-10h]@25 signed int v12; // [sp+2Ch] [bp-Ch]@1 int v13; // [sp+2Ch] [bp-Ch]@9 int v14; // [sp+2Ch] [bp-Ch]@16 int v15; // [sp+2Ch] [bp-Ch]@23 v12 = -2097152; v7 = vFFE00020; if ( vFFE00028 == 1213613663 || (v12 = -4194304, v7 = vFFC00020, vFFC00028 == 1213613663) ) { v3 = 0; for ( i = 0; i <= 0x1F; ++i ) v3 += *(_WORD *)(v12 + 2 * i); if ( v3 ) { v2 = 0x40000000; } else { v13 = v7 + v12; if ( *(_DWORD *)(v13 + 40) == 1213613663 ) { v4 = 0; for ( j = 0; j <= 0x1F; ++j ) v4 += *(_WORD *)(v13 + 2 * j); if ( v4 ) { v2 = 1073741839; } else { v14 = *(_DWORD *)(v13 + 32) + v13; if ( *(_DWORD *)(v14 + 40) == 1213613663 ) { v5 = 0; for ( k = 0; k <= 0x1F; ++k ) v5 += *(_WORD *)(v14 + 2 * k); if ( v5 ) { v2 = 1073741840; } else { v15 = *(_DWORD *)(v14 + 32) + v14; v0 = *(_DWORD *)(v15 + 32); if ( *(_DWORD *)(v15 + 40) == 1213613663 ) { v6 = 0; for ( l = 0; l <= 0x1F; ++l ) v6 += *(_WORD *)(v15 + 2 * l); if ( v6 ) v2 = 1073741842; else v2 = 0; } else { v2 = 1073741841; } } } else { v2 = 1073741838; } } } else { v2 = 1073741837; } } } else { v2 = 1073741836; } return v2; } //----- (00002F3A) -------------------------------------------------------- int __cdecl sub_2F3A(int a1) { int v2; // [sp+18h] [bp-10h]@1 int v3; // [sp+1Ch] [bp-Ch]@1 v3 = 0; v2 = 0; sub_3392(a1, 76, (int)&v2, 1u); v2 = 0; sub_3392(a1, 71, (int)&v2, 1u); v2 = 254; sub_3392(a1, 68, (int)&v2, 1u); return v3; } //----- (000030A3) -------------------------------------------------------- int __cdecl sub_30A3(int a1) { int v2; // [sp+18h] [bp-10h]@1 int v3; // [sp+1Ch] [bp-Ch]@1 v3 = 0; sub_3392(a1, 68, (int)&v2, 0); if ( (unsigned __int8)v2 == 253 ) { v3 = -1073741819; } else if ( v2 & 0x20000000 ) { v3 = -1073741818; } else if ( (unsigned __int8)v2 == 254 ) { sub_3392(a1, 76, (int)&v2, 0); if ( v2 & 1 ) v3 = 1073741829; if ( v2 & 2 ) v3 = 1073741830; if ( v2 & 4 ) v3 = 1073741831; if ( v2 & 8 ) v3 = 1073741832; if ( v2 & 0x10 ) v3 = 1073741833; } else { v3 = -1073741822; } v2 = 0; sub_3392(a1, 76, (int)&v2, 1u); v2 = 0; sub_3392(a1, 71, (int)&v2, 1u); return v3; } //----- (000031EB) -------------------------------------------------------- int __cdecl sub_31EB(int a1) { int v2; // [sp+18h] [bp-10h]@1 int v3; // [sp+1Ch] [bp-Ch]@1 v3 = 0; v2 = 0; sub_3392(a1, 76, (int)&v2, 1u); v2 = 31; v3 = sub_3392(a1, 72, (int)&v2, 1u); v2 = 128; return sub_3392(a1, 71, (int)&v2, 1u); } //----- (00003392) -------------------------------------------------------- int __cdecl sub_3392(int a1, int a2, int a3, unsigned int a4) { int v5; // [sp+2Ch] [bp-13Ch]@2 char v6[68]; // [sp+4Ch] [bp-11Ch]@1 unsigned __int8 v7; // [sp+90h] [bp-D8h]@3 unsigned __int8 v8; // [sp+91h] [bp-D7h]@3 unsigned __int8 v9; // [sp+92h] [bp-D6h]@3 unsigned __int8 v10; // [sp+93h] [bp-D5h]@3 unsigned __int8 v11; // [sp+94h] [bp-D4h]@3 unsigned __int8 v12; // [sp+95h] [bp-D3h]@3 unsigned __int8 v13; // [sp+96h] [bp-D2h]@3 unsigned __int8 v14; // [sp+97h] [bp-D1h]@3 unsigned __int8 v15; // [sp+98h] [bp-D0h]@3 unsigned __int8 v16; // [sp+99h] [bp-CFh]@3 unsigned __int8 v17; // [sp+9Ah] [bp-CEh]@3 unsigned __int8 v18; // [sp+9Bh] [bp-CDh]@3 int v19; // [sp+14Ch] [bp-1Ch]@1 int v20; // [sp+150h] [bp-18h]@1 int v21; // [sp+154h] [bp-14h]@3 int v22; // [sp+158h] [bp-10h]@3 int v23; // [sp+15Ch] [bp-Ch]@3 v20 = ((int (__cdecl *)(_DWORD))**(_DWORD **)L"4x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x")(*(_DWORD *)L"4x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x"); v19 = (*(int (__cdecl **)(_DWORD, _DWORD, int, _DWORD))(*(_DWORD *)L"4x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x" + 4))( *(_DWORD *)L"4x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", v6, v20, 0); if ( v19 >= 0 ) { v22 = (v13 << 16) + (v12 << 8) + v11 + (v14 << 24); v21 = (v17 << 16) + (v16 << 8) + v15 + (v18 << 24); v23 = (v9 << 16) + (v8 << 8) + v7 + (v10 << 24); if ( a4 ) { v6[a2] = *(_DWORD *)a3 % 0xFFu; if ( a4 > 1 ) v6[a2 + 1] = (*(_DWORD *)a3 >> 8) % 0xFFu; if ( a4 > 2 ) v6[a2 + 2] = (*(_DWORD *)a3 >> 16) % 0xFFu; if ( a4 > 3 ) v6[a2 + 3] = (*(_DWORD *)a3 >> 24) % 0xFFu; (*(void (__cdecl **)(_DWORD, char *, signed int, int))(*(_DWORD *)L"4x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x" + 8))( *(_DWORD *)L"4x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", &v6[a2], 4, a2); } else { *(_DWORD *)a3 = ((unsigned __int8)v6[a2 + 2] << 16) + ((unsigned __int8)v6[a2 + 1] << 8) + (unsigned __int8)v6[a2] + ((unsigned __int8)v6[a2 + 3] << 24); } v5 = v19; } else { v5 = v19; } return v5; } // EEA8: using guessed type __int16 a8x04x04x02x02x[47]; // 3392: using guessed type char var_11C[68]; //----- (00003E75) -------------------------------------------------------- // write access to const memory has been detected, the output may be wrong! int __cdecl sub_3E75(int a1) { int result; // eax@7 int v2; // [sp+Ch] [bp-1Ch]@2 signed int i; // [sp+1Ch] [bp-Ch]@4 if ( a1 ) v2 = a1; else v2 = 5489; dword_F150[0] = v2; for ( i = 1; i <= 623; ++i ) dword_F150[i] = i + 1812433253 * (dword_F150[i - 1] ^ ((unsigned int)dword_F150[i - 1] >> 30)); result = (int)dword_F0D0; dword_F0D0[0] = 1; return result; } // 3EA1: write access to const memory at F150 has been detected // 3EF4: write access to const memory at F0D0 has been detected // F0D0: using guessed type int dword_F0D0[32]; // F150: using guessed type int dword_F150[21]; //----- (0000412E) -------------------------------------------------------- bool __cdecl sub_412E(int a1) { int v3; // [sp+24h] [bp-24h]@1 signed int v4; // [sp+2Ch] [bp-1Ch]@1 int i; // [sp+30h] [bp-18h]@1 int v6; // [sp+38h] [bp-10h]@2 int v7; // [sp+3Ch] [bp-Ch]@4 v3 = sub_7034(a1); v4 = 0; for ( i = 0; i < v3; ++i ) { v6 = sub_6C92((int)dword_EF90, *(_BYTE *)(a1 - 1 + v3 - i)); if ( !v6 ) return 0; v7 = v6 - (_DWORD)dword_EF90; if ( i & 1 ) v4 += 3 * v7; else v4 += v7; } return v4 % 34 == 0; } // EF90: using guessed type int dword_EF90[9]; //----- (000048DC) -------------------------------------------------------- // write access to const memory has been detected, the output may be wrong! signed int __cdecl sub_48DC(int a1) { int (__cdecl *v1)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD); // edi@12 int v2; // esi@12 int v3; // eax@12 int (__cdecl *v4)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD); // edi@17 int v5; // esi@17 int v6; // eax@17 int v7; // eax@24 char v9; // [sp+10h] [bp-358h]@0 char v11[256]; // [sp+34h] [bp-334h]@20 __int16 v12; // [sp+134h] [bp-234h]@19 int v13; // [sp+334h] [bp-34h]@2 int v14; // [sp+338h] [bp-30h]@1 int v15; // [sp+33Ch] [bp-2Ch]@1 int i; // [sp+340h] [bp-28h]@8 int j; // [sp+344h] [bp-24h]@20 char v18; // [sp+34Bh] [bp-1Dh]@1 int v19; // [sp+34Ch] [bp-1Ch]@30 v14 = 0; v18 = 0; v15 = (*(int (__cdecl **)(_DWORD, _DWORD, int *))(unk_0 + 172))(0, 0, &dword_EFCC); if ( !v15 ) return v15; v15 = (*(int (__cdecl **)(int, int, int *))(unk_0 + 88))(a1, dword_FC44[0], &v13); if ( !v15 ) { if ( !*(_DWORD *)(v13 + 16) ) { sub_5FAF(1952673887, 1480938066, 0, (int)"hic Arts Prepress Device", v9); return -2147483646; } v15 = (*(int (__cdecl **)(_DWORD, _DWORD, int *))(unk_0 + 88))(*(_DWORD *)(v13 + 12), 0, &v14); if ( v15 ) return v15; for ( i = v14; (*(_BYTE *)i & 0x7F) != 127 || *(_BYTE *)(i + 1) != -1; i += *(_BYTE *)(i + 2) | (*(_BYTE *)(i + 3) << 8) ) { if ( (*(_BYTE *)i & 0x7F) == 3 && (*(_BYTE *)(i + 1) == 11 || *(_BYTE *)(i + 1) == 12) ) { v14 = sub_A03E(v14, *(_DWORD *)(v13 + 16)); sub_80C5(v14, 0); v18 = 1; v1 = *(int (__cdecl **)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))(unk_0 + 56); v2 = v14; v3 = sub_9DAC(v14); v15 = v1(&unk_DD00, dword_EFBC, 2, v3, v2); (*(void (__cdecl **)(int))(unk_0 + 48))(v14); break; } } if ( !v18 ) { v4 = *(int (__cdecl **)(_DWORD, _DWORD, _DWORD, _DWORD, _DWORD))(unk_0 + 56); v5 = v14; v6 = sub_9DAC(v14); v15 = v4(&unk_DD00, dword_EFBC, 2, v6, v5); } if ( !v15 ) { if ( sub_80C5(*(_DWORD *)(v13 + 16), (int)&v12) ) { v11[0] = 0; v15 = sub_54CB((int)"ices Device", (int)"ptical Memory Device"); } else { sub_6893((int)&v12, (int)v11, 256); for ( j = 0; ; ++j ) { v7 = sub_7034((int)v11); if ( v7 <= j ) break; if ( v11[j] == 92 ) v11[j] = 47; } if ( sub_6F8B((int)v11, (int)"r") && !sub_6D34((int)v11, (int)"Enclosure Services Device") && !sub_6D34((int)v11, (int)"re Services Device") && v11[sub_7034((int)v11) - 1] != 47 ) sub_6BCE((int)v11, (int)"r"); v19 = sub_6CC2((int)v11, 0x2Fu); if ( v19 ) { ++v19; *(_BYTE *)v19 = 0; } if ( v11[sub_7034((int)v11) - 1] != 47 ) sub_6BCE((int)v11, (int)"r"); if ( sub_7034((int)v11) ) v15 = sub_54CB((int)"ices Device", (int)v11); } } if ( v18 ) { sub_6BCE((int)v11, (int)"lified Direct Access Device"); sub_683B((int)v11, (int)&v12, 256); } else { v12 = 0; } sub_BACB((int)&v12, (int)L"location"); if ( !v15 ) v15 = sub_849A(a1, (int)&v12, (int)&dword_EFB4, 0); if ( v15 ) sub_B563((int)&off_DD50, v15); else v15 = (*(int (__cdecl **)(_DWORD, _DWORD, int *))(unk_0 + 172))(0, 0, &dword_EFCC); return v15; } return v15; } // 4DFE: write access to const memory at EFB8 has been detected // DD18: using guessed type __int16 aLocation[9]; // EFB4: using guessed type int dword_EFB4; // EFB8: using guessed type int dword_EFB8; // EFBC: using guessed type int dword_EFBC[4]; // EFCC: using guessed type int dword_EFCC; // FC44: using guessed type int dword_FC44[2]; // 48DC: using guessed type char var_334[256]; //----- (00004E73) -------------------------------------------------------- int __cdecl sub_4E73(int a1, int a2) { return unk_20(a1, a2); } //----- (00004EA0) -------------------------------------------------------- int __cdecl sub_4EA0(int a1) { return ((int (__cdecl *)(int))unk_10C3E)(a1); } //----- (00004EC6) -------------------------------------------------------- int __cdecl sub_4EC6(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8) { return (*(int (__cdecl **)(int, int, int, int, int, int, int, int))((char *)&off_37 + 1))( a1, a2, a3, a4, a5, a6, a7, a8); } // 37: using guessed type void *off_37; //----- (00004F1D) -------------------------------------------------------- int __cdecl sub_4F1D(int a1, int a2) { return unk_3C(a1, a2); } //----- (00004F4A) -------------------------------------------------------- int __cdecl sub_4F4A(int a1, int a2) { return unk_40(a1, a2); } //----- (00004F77) -------------------------------------------------------- int __cdecl sub_4F77(int a1) { return unk_44(a1); } //----- (00004F9D) -------------------------------------------------------- int __cdecl sub_4F9D(int a1, int a2, int a3, int a4, __int16 a5, int a6, __int16 a7) { __int16 v7; // ST1C_2@1 __int16 v8; // ST14_2@1 v7 = a7; v8 = a5; return unk_48(a1, a2, a3, a4); } //----- (00004FF8) -------------------------------------------------------- int __cdecl sub_4FF8(int a1) { return ((int (__cdecl *)(int))dword_4C[0])(a1); } // 4C: using guessed type int dword_4C[8]; //----- (000051CE) -------------------------------------------------------- int __cdecl sub_51CE(int a1, int a2, int a3, int a4) { return ((int (__cdecl *)(int, int, int, int))dword_74[11])(a1, a2, a3, a4); } // 74: using guessed type int dword_74[13]; //----- (000054CB) -------------------------------------------------------- int __cdecl sub_54CB(int a1, int a2) { char v3; // [sp+28h] [bp-210h]@1 int v4; // [sp+22Ch] [bp-Ch]@2 sub_683B(a1, (int)&v3, 256); if ( a2 ) v4 = sub_7034(a2) + 1; else v4 = 0; return (*(int (__cdecl **)(char *, _DWORD, signed int, int, int))(unk_0 + 56))(&v3, dword_EFBC, 2, v4, a2); } // EFBC: using guessed type int dword_EFBC[4]; //----- (00005FAF) -------------------------------------------------------- int __cdecl sub_5FAF(int a1, int a2, int a3, int a4, char a5) { return ((int (__cdecl *)(int, int, int, int, char *))dword_158[12])(a1, a2, a3, a4, &a5); } // 158: using guessed type int[20]; //----- (000061E8) -------------------------------------------------------- int __cdecl sub_61E8(int a1, int a2, int a3, int a4, int a5, int a6) { return ((int (__cdecl *)(int, int, int, int, int, int))dword_158[18])(a1, a2, a3, a4, a5, a6); } // 158: using guessed type int dword_158[20]; //----- (00006234) -------------------------------------------------------- int __cdecl sub_6234(int a1, int a2, int a3, int a4) { return ((int (__cdecl *)(int, int, int, int))dword_158[17])(a1, a2, a3, a4); } // 158: using guessed type int dword_158[20]; //----- (00006374) -------------------------------------------------------- #error "6399: positive sp value has been found (funcsize=13)" //----- (000064C8) -------------------------------------------------------- int __cdecl sub_64C8(char a1, int a2, int a3, int a4, int a5) { return loc_4(a1, a2, a3, a4, a5); } //----- (00006511) -------------------------------------------------------- int __cdecl sub_6511(char a1, int a2, int a3, int a4, unsigned __int8 a5) { return (*(int (__cdecl **)(_DWORD, int, int, int, _DWORD))((char *)&loc_7 + 1))(a1, a2, a3, a4, a5); } //----- (00006561) -------------------------------------------------------- int sub_6561() { return unk_C(); } //----- (0000683B) -------------------------------------------------------- int __cdecl sub_683B(int a1, int a2, int a3) { int v4; // [sp+8h] [bp-10h]@1 int i; // [sp+Ch] [bp-Ch]@1 v4 = a2; for ( i = 0; *(_BYTE *)a1 && a3 - 1 > i; ++i ) { *(_WORD *)a2 = *(_BYTE *)a1; a2 += 2; ++a1; } if ( a3 - 1 > i ) *(_WORD *)a2 = 0; return v4; } //----- (00006893) -------------------------------------------------------- int __cdecl sub_6893(int a1, int a2, int a3) { int v4; // [sp+8h] [bp-10h]@1 int i; // [sp+Ch] [bp-Ch]@1 v4 = a2; for ( i = 0; *(_WORD *)a1 && a3 - 1 > i; ++i ) { *(_BYTE *)a2++ = *(_WORD *)a1; a1 += 2; } if ( a3 - 1 > i ) *(_BYTE *)a2 = 0; return v4; } //----- (00006987) -------------------------------------------------------- int __cdecl sub_6987(unsigned __int8 a1, int a2) { return ((int (__cdecl *)(_DWORD, int))dword_124[1])(a1, a2); } // 124: using guessed type int[8]; //----- (00006BCE) -------------------------------------------------------- int __cdecl sub_6BCE(int a1, int a2) { char v2; // al@4 int v4; // [sp+4h] [bp-14h]@1 int v5; // [sp+8h] [bp-10h]@1 v4 = 0; v5 = 0; while ( *(_BYTE *)(a1 + v4) ) ++v4; do { *(_BYTE *)(a1 + v4) = *(_BYTE *)(a2 + v5); v2 = *(_BYTE *)(a1 + v4++) != 0; ++v5; } while ( v2 ); return a1; } //----- (00006C92) -------------------------------------------------------- int __cdecl sub_6C92(int a1, int a2) { return unk_230(a1, a2); } //----- (00006CC2) -------------------------------------------------------- int __cdecl sub_6CC2(int a1, unsigned __int8 a2) { int v3; // [sp+8h] [bp-20h]@6 int v4; // [sp+Ch] [bp-1Ch]@8 int v5; // [sp+10h] [bp-18h]@1 int v6; // [sp+14h] [bp-14h]@1 v5 = a1 - 1; v6 = 0; while ( 1 ) { ++v5; if ( !*(_BYTE *)v5 ) break; if ( *(_BYTE *)v5 == a2 ) v6 = v5; } if ( v6 ) { v3 = v6; } else { if ( a2 ) v4 = 0; else v4 = v5; v3 = v4; } return v3; } //----- (00006D34) -------------------------------------------------------- int __cdecl sub_6D34(int a1, int a2) { int v3; // [sp+Ch] [bp-2Ch]@3 int v4; // [sp+14h] [bp-24h]@1 int v5; // [sp+28h] [bp-10h]@5 int v6; // [sp+2Ch] [bp-Ch]@5 v4 = a1 - 1; if ( a2 && *(_BYTE *)a2 ) { while ( 1 ) { ++v4; if ( !*(_BYTE *)v4 ) break; if ( *(_BYTE *)v4 == *(_BYTE *)a2 ) { v5 = v4 - 1; v6 = a2 - 1; do { ++v5; ++v6; } while ( *(_BYTE *)v5 == *(_BYTE *)v6 && *(_BYTE *)v5 ); if ( !*(_BYTE *)v6 ) return v4; } } v3 = 0; } else { v3 = a1; } return v3; } //----- (00006EC6) -------------------------------------------------------- int __cdecl sub_6EC6(int a1, int a2, int a3) { return ((int (__cdecl *)(int, int, int))dword_244[3])(a1, a2, a3); } // 244: using guessed type int[4]; //----- (00006EFD) -------------------------------------------------------- int __cdecl sub_6EFD(int a1, int a2, char a3) { return sub_6EC6(a1, a2, (int)&a3); } //----- (00006F24) -------------------------------------------------------- int __cdecl sub_6F24(int a1, int a2) { return ((int (__cdecl *)(int, int))((char *)&loc_5FE + 2))(a1, a2); } //----- (00006F8B) -------------------------------------------------------- int __cdecl sub_6F8B(int a1, int a2) { while ( *(_BYTE *)a1 && *(_BYTE *)a1 == *(_BYTE *)a2 ) { ++a1; ++a2; } return *(_BYTE *)a1 - *(_BYTE *)a2; } //----- (00007034) -------------------------------------------------------- int __cdecl sub_7034(int a1) { char v1; // al@3 int i; // [sp+Ch] [bp-Ch]@1 for ( i = 0; ; ++i ) { v1 = *(_BYTE *)a1++ != 0; if ( !v1 ) break; } return i; } //----- (00007B34) -------------------------------------------------------- int sub_7B34() { int result; // eax@1 int v1; // [sp+20h] [bp-18h]@1 unsigned int v2; // [sp+24h] [bp-14h]@1 int v3; // [sp+28h] [bp-10h]@1 unsigned int i; // [sp+2Ch] [bp-Ch]@2 result = (*(int (__cdecl **)(_DWORD, _DWORD, _DWORD, unsigned int *, int *))(unk_0 + 168))(0, 0, 0, &v2, &v1); v3 = result; if ( result >= 0 ) { for ( i = 0; i < v2; ++i ) (*(void (__cdecl **)(_DWORD, _DWORD, _DWORD, signed int))(unk_0 + 144))(*(_DWORD *)(4 * i + v1), 0, 0, 1); (*(void (__cdecl **)(int))(unk_0 + 48))(v1); result = (*(int (**)(void))(*(_DWORD *)dword_FC74[0] + 76))(); } return result; } // FC74: using guessed type int dword_FC74[3]; //----- (00007C00) -------------------------------------------------------- int __cdecl sub_7C00(int a1, int a2, unsigned int a3) { int v3; // eax@12 unsigned int v4; // esi@17 char v5; // al@19 signed int v7; // [sp+2Ch] [bp-69Ch]@3 char v8; // [sp+30h] [bp-698h]@9 __int16 v9[512]; // [sp+230h] [bp-498h]@4 __int16 _62F[512]; // [sp+62Fh] [bp-99h]@7 char v11[128]; // [sp+630h] [bp-98h]@4 int v12; // [sp+6B0h] [bp-18h]@6 int v13; // [sp+6B4h] [bp-14h]@6 unsigned int i; // [sp+6B8h] [bp-10h]@13 __int16 *v15; // [sp+6BCh] [bp-Ch]@7 if ( a2 && a3 ) { sub_B71B((int)v11, (int)"lified Direct Access Device"); v9[0] = 0; if ( !sub_830D() && *(_WORD *)a1 != 47 ) { v12 = 128; v13 = (*(int (__cdecl **)(_DWORD, int, _DWORD, int *, _DWORD))(unk_0 + 48))( L"-number2", dword_FC3C[0], 0, &v12, v11); if ( v11[v12 - 2] != 47 ) { v15 = (__int16 *)((char *)_62F + v12); *((_BYTE *)_62F + v12) = 47; v15 = (__int16 *)((char *)v15 + 1); *(_BYTE *)v15 = 0; } if ( v11[0] != 47 ) { v12 = 512; v13 = (*(int (__cdecl **)(_DWORD, int, _DWORD, int *, char *))(unk_0 + 48))( L"serial-number3", dword_FC3C[0], 0, &v12, &v8); if ( v13 < 0 ) return v13; sub_683B((int)&v8, (int)v9, 512); } v3 = sub_B680((int)v9); sub_683B((int)v11, (int)&v9[v3], 128); } sub_BACB((int)v9, a1); for ( i = 0; ; ++i ) { v4 = i; if ( v4 >= sub_B680((int)v9) ) break; if ( v9[i] == 47 ) v9[i] = 92; } if ( sub_B8EA((int)v9) <= a3 ) { sub_B65D(a2, (int)v9); v7 = 0; } else { v5 = sub_B8EA((int)v9); sub_B563((int)L"\u6900\u6100\u6c00\u2d00\u6e00\u7500\u6d00\u6200\u6500\u7200\u3300", v5); v7 = -2147483639; } } else { v7 = -2147483646; } return v7; } // DD90: using guessed type __int16 aNumber2[9]; // DDAC: using guessed type __int16 aSerialNumber3[15]; // FC3C: using guessed type int dword_FC3C[2]; // 7C00: using guessed type char var_98[128]; // 7C00: using guessed type __int16 var_498[512]; //----- (00007E67) -------------------------------------------------------- int __cdecl sub_7E67(int a1, char a2, int a3) { int v4; // [sp+28h] [bp-B0h]@11 bool v5; // [sp+3Ch] [bp-9Ch]@13 char v6; // [sp+43h] [bp-95h]@10 __int16 v7[64]; // [sp+44h] [bp-94h]@6 int v8; // [sp+C4h] [bp-14h]@10 int i; // [sp+C8h] [bp-10h]@1 int v10; // [sp+CCh] [bp-Ch]@5 for ( i = a1 + 2 * sub_B680(a1) - 2; *(_WORD *)i && *(_WORD *)i != 92; i -= 2 ) ; i += 2; v10 = 0; while ( *(_WORD *)i && *(_WORD *)i != 46 ) { v7[v10++] = *(_WORD *)i; i += 2; } v7[v10] = 0; if ( a2 ) { v5 = 1; v8 = (*(int (__cdecl **)(_DWORD, int, _DWORD, bool *, char *))(unk_0 + 48))(v7, dword_FC3C[0], 0, &v5, &v6); if ( v8 >= 0 ) { if ( a2 == 1 ) { ++v6; } else if ( a2 == 2 ) { --v6; } v5 = v6 != 0; *(_BYTE *)a3 = v6; v8 = (*(int (__cdecl **)(_DWORD, int, signed int, bool, char *))(unk_0 + 56))(v7, dword_FC3C[0], 2, v5, &v6); v4 = v8; } else { sub_B563((int)L"\u7600\u6500\u7200\u7300\u6900\u6f00\u6e00", v8); v4 = v8; } } else { v6 = 1; v8 = (*(int (__cdecl **)(_DWORD, int, signed int, signed int, char *))(unk_0 + 56))(v7, dword_FC3C[0], 2, 1, &v6); if ( v8 >= 0 ) { *(_BYTE *)a3 = v6; v4 = 0; } else { sub_B563((int)L":%02x", v8); v4 = v8; } } return v4; } // DE3C: using guessed type __int16 a02x[6]; // DE90: using guessed type __int16 aMcVersion[11]; // FC3C: using guessed type int dword_FC3C[2]; // 7E67: using guessed type __int16 var_94[64]; //----- (000080C5) -------------------------------------------------------- signed int __cdecl sub_80C5(int a1, int a2) { signed int v3; // [sp+1Ch] [bp-41Ch]@12 __int16 v4[512]; // [sp+28h] [bp-410h]@1 int v5; // [sp+428h] [bp-10h]@1 int v6; // [sp+42Ch] [bp-Ch]@4 v4[0] = 0; v5 = 0; while ( (*(_BYTE *)a1 & 0x7F) != 127 || *(_BYTE *)(a1 + 1) != -1 ) { if ( (*(_BYTE *)a1 & 0x7F) == 4 && *(_BYTE *)(a1 + 1) == 4 ) { v6 = a1; if ( !a2 ) { *(_BYTE *)a1 = 127; *(_BYTE *)(a1 + 1) = -1; *(_BYTE *)(a1 + 2) = 4; *(_BYTE *)(a1 + 3) = 0; return 0; } if ( v5 ) { if ( v4[v5] != 92 && v4[v5] != 47 ) sub_BACB((int)v4, (int)L"vision"); sub_BACB((int)v4, v6 + 4); } else { sub_BACB((int)v4, v6 + 4); } v5 = sub_B680((int)v4); } a1 += *(_BYTE *)(a1 + 2) | (*(_BYTE *)(a1 + 3) << 8); } if ( v5 ) { sub_B65D(a2, (int)v4); v3 = 0; } else { v3 = -2147483634; } return v3; } // DF38: using guessed type __int16 aVision[7]; // 80C5: using guessed type __int16 var_410[512]; //----- (00008252) -------------------------------------------------------- signed int __cdecl sub_8252(int a1) { signed int v2; // [sp+2Ch] [bp-41Ch]@2 int v3; // [sp+38h] [bp-410h]@1 char v4; // [sp+3Ch] [bp-40Ch]@1 int v5; // [sp+43Ch] [bp-Ch]@1 v3 = 512; v5 = (*(int (__cdecl **)(__int16 *, int, _DWORD, int *, char *))(unk_0 + 48))( L"\u6900\u7300\u6900\u6f00\u6e00", dword_FC3C[0], 0, &v3, &v4); if ( v5 ) { v2 = v5; } else { *(_DWORD *)a1 = sub_A90D(v3, (int)&v4); if ( *(_DWORD *)a1 ) v2 = 0; else v2 = -2147483639; } return v2; } // DF38: using guessed type __int16 aVision[7]; // FC3C: using guessed type int dword_FC3C[2]; //----- (0000830D) -------------------------------------------------------- // write access to const memory has been detected, the output may be wrong! signed int sub_830D() { signed int v1; // [sp+1Ch] [bp-1Ch]@2 int v2; // [sp+28h] [bp-10h]@3 int i; // [sp+2Ch] [bp-Ch]@5 if ( LOBYTE(dword_EFD0[0]) ) { v1 = 1; } else if ( sub_8252((int)&v2) ) { v1 = 0; } else { for ( i = v2; (*(_BYTE *)i & 0x7F) != 127 || *(_BYTE *)(i + 1) != -1; i += *(_BYTE *)(i + 2) | (*(_BYTE *)(i + 3) << 8) ) { if ( (*(_BYTE *)i & 0x7F) == 3 && (*(_BYTE *)(i + 1) == 11 || *(_BYTE *)(i + 1) == 12) ) { LOBYTE(dword_EFD0[0]) = 1; break; } } (*(void (__cdecl **)(int))(unk_0 + 48))(v2); v1 = LOBYTE(dword_EFD0[0]); } return v1; } // 8383: write access to const memory at EFD0 has been detected // EFD0: using guessed type int dword_EFD0[12]; //----- (0000849A) -------------------------------------------------------- signed int __cdecl sub_849A(int a1, int a2, int a3, char a4) { signed int v5; // [sp+28h] [bp-440h]@4 int v6; // [sp+34h] [bp-434h]@20 char v7; // [sp+3Bh] [bp-42Dh]@15 int v8; // [sp+3Ch] [bp-42Ch]@7 int v9; // [sp+40h] [bp-428h]@1 unsigned int v10; // [sp+44h] [bp-424h]@1 char v11; // [sp+48h] [bp-420h]@3 int v12; // [sp+448h] [bp-20h]@24 int v13; // [sp+44Ch] [bp-1Ch]@24 int v14; // [sp+450h] [bp-18h]@3 int v15; // [sp+454h] [bp-14h]@20 int v16; // [sp+458h] [bp-10h]@22 unsigned int i; // [sp+45Ch] [bp-Ch]@6 v10 = 0; v9 = 0; if ( a3 ) *(_DWORD *)a3 = 0; v14 = sub_7C00(a2, (int)&v11, 0x200u); if ( v14 >= 0 ) { v14 = (*(int (__cdecl **)(signed int, int, _DWORD, unsigned int *, int *))(unk_0 + 168))( 2, dword_FC44[0], 0, &v10, &v9); if ( v14 >= 0 ) { for ( i = 0; i < v10; ++i ) { v14 = (*(int (__cdecl **)(_DWORD, int, int *))(unk_0 + 88))(*(_DWORD *)(4 * i + v9), dword_FC44[0], &v8); if ( *(_DWORD *)(v8 + 16) && (**(_BYTE **)(v8 + 16) != 4 || *(_BYTE *)(*(_DWORD *)(v8 + 16) + 1) != 6) ) { if ( v14 >= 0 ) { if ( !sub_B694((unsigned __int16 *)&v11, *(_DWORD *)(v8 + 16) + 4) ) { if ( a3 ) *(_DWORD *)a3 = *(_DWORD *)(4 * i + v9); v14 = sub_7E67((int)&v11, 1, (int)&v7); if ( v14 >= 0 ) { (*(void (__cdecl **)(int))(unk_0 + 48))(v9); return -2147483628; } } } else { sub_B563( (int)L"\u6200\u7200\u6900\u6400\u6700\u6500\u2d00\u6400\u6500\u7600\u6900\u6300\u6500\u2d00\u6900\u6400", v14); } } } (*(void (__cdecl **)(int))(unk_0 + 48))(v9); } v15 = sub_A1CB(0, (int)&v11); v14 = sub_8252((int)&v6); if ( v14 ) { v5 = v14; } else { v16 = sub_9F6C(v6, v15); v14 = (*(int (__cdecl **)(_DWORD, int, int, _DWORD))(unk_0 + 112))(0, a1, v16, 0); (*(void (__cdecl **)(int))(unk_0 + 48))(v6); (*(void (__cdecl **)(int))(unk_0 + 48))(v16); if ( v14 ) { v5 = v14; } else { v14 = (*(int (__cdecl **)(int, int, int *))(unk_0 + 88))(v12, dword_FC44[0], &v13); if ( *(_DWORD *)(v13 + 16) ) { if ( *(_DWORD *)(v13 + 48) == 3 || *(_DWORD *)(v13 + 48) == 5 ) { if ( *(_DWORD *)(v13 + 16) ) { if ( sub_B694((unsigned __int16 *)(*(_DWORD *)(v13 + 16) + 4), (int)&v11) ) { (*(void (__cdecl **)(_DWORD))(unk_0 + 48))(*(_DWORD *)(v13 + 16)); *(_DWORD *)(v13 + 16) = v15; } else { (*(void (__cdecl **)(int))(unk_0 + 48))(v15); } } v14 = (*(int (__cdecl **)(int, _DWORD, _DWORD))(unk_0 + 116))(v12, 0, 0); if ( v14 ) { sub_B563((int)L"ults", v14); } else { if ( a3 ) *(_DWORD *)a3 = v12; v14 = sub_7E67((int)&v11, 0, (int)&v7); if ( v14 < 0 ) return v14; if ( a4 ) sub_7B34(); } return v14; } sub_B563((int)L"revision", *(_DWORD *)(v13 + 48)); v5 = -2147483646; } else { sub_5FAF(1952673887, 1480938066, 0, (int)"cess Device", 0); v5 = -2147483646; } } } } else { v5 = v14; } return v5; } // DF50: using guessed type __int16 aHbridgeDeviceI[18]; // DF8C: using guessed type __int16 aRevision[9]; // DFC0: using guessed type __int16 aUlts[5]; // FC44: using guessed type int dword_FC44[2]; //----- (00008AD4) -------------------------------------------------------- signed int __cdecl sub_8AD4(int a1, int a2, int a3) { signed int v4; // [sp+2Ch] [bp-3Ch]@7 int v5; // [sp+34h] [bp-34h]@2 int v6; // [sp+38h] [bp-30h]@2 int v7; // [sp+3Ch] [bp-2Ch]@2 int v8; // [sp+40h] [bp-28h]@2 unsigned int v9; // [sp+44h] [bp-24h]@1 char v10; // [sp+4Ah] [bp-1Eh]@2 int v11; // [sp+4Ch] [bp-1Ch]@1 int v12; // [sp+50h] [bp-18h]@2 unsigned int v13; // [sp+54h] [bp-14h]@1 int v14; // [sp+58h] [bp-10h]@2 unsigned int i; // [sp+5Ch] [bp-Ch]@1 v9 = 0; v11 = (*(int (__cdecl **)(signed int, _DWORD, _DWORD, unsigned int *, int *))(unk_0 + 168))(2, 0, 0, &v9, &a2); v13 = 999; for ( i = 0; i < v9; ++i ) { v11 = (*(int (__cdecl **)(_DWORD, _DWORD, int))(unk_0 + 88))(*(_DWORD *)(4 * i + a2), 0, a3); v12 = *(_DWORD *)a3; v11 = (*(int (__cdecl **)(int, int *, int *, int *, int *))(v12 + 56))(v12, &v8, &v7, &v6, &v5); v14 = (v6 << 8) | (v7 << 16) | (v8 << 24) | v5; v11 = (*(int (__cdecl **)(int, signed int, signed int, signed int, char *))(v12 + 24))(v12, 1, 2, 1, &v10); if ( v14 == a1 ) { v13 = i; break; } } if ( v13 == 999 ) { v4 = -2147483645; } else { v11 = (*(int (__cdecl **)(_DWORD, _DWORD, int))(unk_0 + 88))(*(_DWORD *)(4 * v13 + a2), 0, a3); v12 = *(_DWORD *)a3; if ( a2 ) (*(void (__cdecl **)(int))(unk_0 + 48))(a2); v4 = 0; } return v4; } //----- (00008CBD) -------------------------------------------------------- int __cdecl sub_8CBD(int a1, unsigned __int8 a2) { unsigned __int8 v3; // [sp+3Bh] [bp-Dh]@1 (*(void (__cdecl **)(int, _DWORD, _DWORD, signed int, unsigned __int8 *))(a1 + 24))(a1, 0, a2, 1, &v3); return v3; } //----- (00008D02) -------------------------------------------------------- int __cdecl sub_8D02(int a1, unsigned __int8 a2) { unsigned __int16 v3; // [sp+3Ah] [bp-Eh]@1 (*(void (__cdecl **)(int, signed int, _DWORD, signed int, unsigned __int16 *))(a1 + 24))(a1, 1, a2, 1, &v3); return v3; } //----- (000092D9) -------------------------------------------------------- void __usercall sub_92D9(int a1@<ebp>) { char v1; // ST08_1@1 int v2; // edx@14 char v3; // [sp+4h] [bp-64h]@1 *(_WORD *)(a1 - 16) = sub_8D02(*(_DWORD *)(a1 + 8), 0); *(_WORD *)(a1 - 14) = sub_8D02(*(_DWORD *)(a1 + 8), 2u); *(_BYTE *)(a1 - 11) = sub_8CBD(*(_DWORD *)(a1 + 8), 0xAu); *(_BYTE *)(a1 - 10) = sub_8CBD(*(_DWORD *)(a1 + 8), 0xBu); *(_BYTE *)(a1 - 9) = sub_8CBD(*(_DWORD *)(a1 + 8), 9u); sub_B563((int)L"\u4200\u5f00\u5300\u6500\u7400\u4500\u5300\u5400", v1); *(_DWORD *)(a1 - 76) = *(_WORD *)(a1 - 16); if ( *(_DWORD *)(a1 - 76) == 5348 ) { sub_B563((int)&unk_E01C, v3); } else if ( *(_DWORD *)(a1 - 76) > 5348 ) { if ( *(_DWORD *)(a1 - 76) == 5772 ) { sub_B563((int)&aSetmlbreplaced[7], v3); } else { if ( *(_DWORD *)(a1 - 76) != 32902 ) goto LABEL_12; sub_B563((int)&aGetrtcramsize[7], v3); } } else { if ( *(_DWORD *)(a1 - 76) != 4523 ) { LABEL_12: sub_B563((int)&unk_E06C, *(_WORD *)(a1 - 16)); goto LABEL_13; } sub_B563((int)((char *)&dword_E045 + 1), v3); } LABEL_13: sub_B563((int)L"\u2000\u2000", *(_WORD *)(a1 - 14)); *(_DWORD *)(a1 - 72) = *(_BYTE *)(a1 - 10); v2 = *(_DWORD *)(a1 - 72); JUMPOUT(*(_DWORD *)algn_9429); } // E008: using guessed type __int16 aLb_setest[10]; // E024: using guessed type __int16 aSetmlbreplaced[15]; // E045: using guessed type int dword_E045; // E04C: using guessed type __int16 aGetrtcramsize[14]; // E0BC: using guessed type __int16[4]; //----- (00009DAC) -------------------------------------------------------- int __cdecl sub_9DAC(int a1) { int result; // eax@1 int v2; // ecx@1 result = 0; v2 = a1; if ( a1 ) { while ( (*(_BYTE *)v2 & 0x7F) != 127 || *(_BYTE *)(v2 + 1) != -1 ) v2 += (*(_BYTE *)(v2 + 3) << 8) | *(_BYTE *)(v2 + 2); result = v2 - a1 + 4; } return result; } //----- (00009E8A) -------------------------------------------------------- int __cdecl sub_9E8A(int a1) { int v1; // ecx@1 int v2; // ecx@6 int result; // eax@7 v1 = a1; if ( !a1 ) goto LABEL_11; while ( (*(_BYTE *)v1 & 0x7F) != 127 || *(_BYTE *)(v1 + 1) != -1 ) v1 += (*(_BYTE *)(v1 + 3) << 8) | *(_BYTE *)(v1 + 2); v2 = v1 - a1; if ( v2 != -4 ) result = sub_A8A4(v2 + 4, a1); else LABEL_11: result = 0; return result; } //----- (00009F6C) -------------------------------------------------------- int __cdecl sub_9F6C(int a1, int a2) { int v2; // ecx@3 int i; // ecx@8 int v5; // edi@12 int v6; // esi@12 int v7; // [sp+1Ch] [bp-1Ch]@8 if ( !a1 ) { a1 = a2; return sub_9E8A(a1); } v2 = a1; if ( !a2 ) return sub_9E8A(a1); while ( (*(_BYTE *)v2 & 0x7F) != 127 || *(_BYTE *)(v2 + 1) != -1 ) v2 += (*(_BYTE *)(v2 + 3) << 8) | *(_BYTE *)(v2 + 2); v7 = v2 - a1 + 4; for ( i = a2; (*(_BYTE *)i & 0x7F) != 127 || *(_BYTE *)(i + 1) != -1; i += (*(_BYTE *)(i + 3) << 8) | *(_BYTE *)(i + 2) ) ; v5 = i - a2 + 4; v6 = sub_A8A4(v5 + v7 - 4, a1); if ( v6 ) (*(void (__cdecl **)(int, int, int))(unk_0 + 188))(v6 + v7 - 4, a2, v5); return v6; } //----- (0000A03E) -------------------------------------------------------- int __cdecl sub_A03E(int a1, int a2) { int v2; // edi@1 int v3; // eax@1 int v4; // esi@1 int v5; // edx@2 v2 = 0; v3 = sub_A8A4(((*(_BYTE *)(a2 + 3) << 8) | *(_BYTE *)(a2 + 2)) + 4, a2); v4 = v3; if ( v3 ) { v5 = v3 + ((*(_BYTE *)(v3 + 3) << 8) | *(_BYTE *)(v3 + 2)); *(_BYTE *)v5 = 127; *(_BYTE *)(v5 + 1) = -1; *(_BYTE *)(v5 + 2) = 4; *(_BYTE *)(v5 + 3) = 0; v2 = sub_9F6C(a1, v3); (*(void (__cdecl **)(int))(unk_0 + 48))(v4); } return v2; } //----- (0000A1CB) -------------------------------------------------------- int __cdecl sub_A1CB(int a1, int a2) { int v2; // esi@1 int v3; // eax@4 int v4; // edi@4 int v5; // edx@5 int v7; // [sp+1Ch] [bp-2Ch]@4 int v8; // [sp+2Ch] [bp-1Ch]@6 signed int v9; // [sp+38h] [bp-10h]@1 v2 = 0; v9 = 41432; while ( *(_WORD *)(a2 + v2) ) v2 += 2; v3 = sub_AA03(v2 + 10); v7 = 0; v4 = v3; if ( v3 ) { *(_BYTE *)v3 = 4; *(_BYTE *)(v3 + 1) = 4; *(_BYTE *)(v3 + 2) = v2 + 6; *(_BYTE *)(v3 + 3) = (unsigned __int16)(v2 + 6) >> 8; (*(void (__cdecl **)(int, int, int))(unk_0 + 188))(v3 + 4, a2, v2 + 2); v5 = v4 + ((*(_BYTE *)(v4 + 3) << 8) | *(_BYTE *)(v4 + 2)); *(_BYTE *)v5 = 127; *(_BYTE *)(v5 + 1) = -1; *(_BYTE *)(v5 + 2) = 4; *(_BYTE *)(v5 + 3) = 0; v7 = v4; if ( a1 ) { v8 = 0; (*(void (__cdecl **)(int, _DWORD, int *))(unk_0 + 88))(a1, 0, &v8); v7 = sub_9F6C(v8, v4); (*(void (__cdecl **)(int))(unk_0 + 48))(v4); } } return v7; } //----- (0000A2BD) -------------------------------------------------------- // write access to const memory has been detected, the output may be wrong! int __cdecl sub_A2BD(int a1, int a2) { unk_0 = a2; unk_0 = *(_DWORD *)(a2 + 60); unk_0 = *(_DWORD *)(a2 + 56); return 0; } // A2D0: write access to const memory at 0 has been detected // A2DB: write access to const memory at 0 has been detected // A2E6: write access to const memory at 0 has been detected //----- (0000A539) -------------------------------------------------------- signed int __cdecl sub_A539(int a1, int a2, int a3, int a4) { int v4; // ecx@1 int v5; // edi@1 signed int v6; // esi@1 signed int v7; // edx@4 signed int v8; // edx@11 v4 = a2; v5 = a3; v6 = -2147483646; if ( a4 != 0 && a1 != 0 ) { if ( a3 != 0 && a2 != 0 ) { LABEL_9: if ( *(_BYTE *)v4 ) { v7 = 1; do { if ( *(_BYTE *)(a1 + v7 - 1) != *(_BYTE *)(v4 + v7 - 1) ) { v4 += 3; goto LABEL_9; } ++v7; } while ( v7 != 4 ); while ( *(_DWORD *)v5 ) { v8 = 1; while ( *(_BYTE *)(a1 + v8 - 1) == *(_BYTE *)(*(_DWORD *)v5 + v8 - 1) ) { ++v8; if ( v8 == 4 ) { v6 = 0; *(_DWORD *)a4 = *(_DWORD *)(v5 + 4); return v6; } } v5 += 8; } } } v6 = -2147483645; } return v6; } //----- (0000A5CB) -------------------------------------------------------- int __cdecl sub_A5CB(int a1, int a2, int a3, int a4) { sub_A2BD(a1, a2); *(_DWORD *)(a3 + 16) = a1; *(_DWORD *)(a3 + 20) = a4; return (*(int (__cdecl **)(int, _DWORD, _DWORD, int))(unk_0 + 76))(a3 + 20, 0, 0, a3); } //----- (0000A634) -------------------------------------------------------- int __cdecl sub_A634(int a1, int a2, int a3, int a4, int a5, int a6, int a7) { int result; // eax@1 result = sub_A5CB(a1, a2, a3, a4); if ( result >= 0 ) { if ( !a5 || (result = (*(int (__cdecl **)(int, _DWORD, _DWORD, int))(unk_0 + 76))(a3 + 20, 0, 0, a5), result >= 0) ) { if ( !a6 || (result = (*(int (__cdecl **)(int, _DWORD, _DWORD, int))(unk_0 + 76))(a3 + 20, 0, 0, a6), result >= 0) ) { if ( !a7 || (result = (*(int (__cdecl **)(int, _DWORD, _DWORD, int))(unk_0 + 76))(a3 + 20, 0, 0, a7), result >= 0) ) result = 0; } } } return result; } //----- (0000A82A) -------------------------------------------------------- int __cdecl sub_A82A(int a1) { int v2; // [sp+1Ch] [bp-Ch]@1 v2 = 0; (*(void (__cdecl **)(signed int, int, int *))(unk_0 + 44))(4, a1, &v2); return v2; } //----- (0000A8A4) -------------------------------------------------------- int __cdecl sub_A8A4(int a1, int a2) { int v2; // ecx@1 int v4; // [sp+1Ch] [bp-1Ch]@1 v4 = 0; (*(void (__cdecl **)(signed int, int, int *))(unk_0 + 44))(4, a1, &v4); v2 = v4; if ( v4 ) { (*(void (__cdecl **)(int, int, int))(unk_0 + 188))(v4, a2, a1); v2 = v4; } return v2; } //----- (0000A90D) -------------------------------------------------------- int __cdecl sub_A90D(int a1, int a2) { int v2; // ecx@1 int v4; // [sp+1Ch] [bp-1Ch]@1 v4 = 0; (*(void (__cdecl **)(signed int, int, int *))(unk_0 + 44))(6, a1, &v4); v2 = v4; if ( v4 ) { (*(void (__cdecl **)(int, int, int))(unk_0 + 188))(v4, a2, a1); v2 = v4; } return v2; } //----- (0000AA03) -------------------------------------------------------- int __cdecl sub_AA03(int a1) { int v1; // esi@1 int v3; // [sp+1Ch] [bp-1Ch]@1 v3 = 0; (*(void (__cdecl **)(signed int, int, int *))(unk_0 + 44))(4, a1, &v3); v1 = v3; if ( v3 ) (*(void (__cdecl **)(int, int, _DWORD))(unk_0 + 192))(v3, a1, 0); return v1; } //----- (0000AA70) -------------------------------------------------------- int __cdecl sub_AA70(int a1, unsigned int a2, int a3, unsigned int *a4) { int v4; // edi@1 int v5; // esi@1 __int16 v6; // dx@5 int v7; // edx@8 unsigned int *v8; // edx@14 unsigned int *v9; // edx@23 unsigned int v10; // eax@23 unsigned int v11; // edx@23 unsigned int *v12; // edx@24 int v13; // ecx@25 int v14; // esi@25 char *i; // edx@25 unsigned int *v16; // edx@31 int v17; // eax@31 int v18; // edx@31 int *v19; // edx@32 int v20; // eax@33 char *j; // edx@33 unsigned int *v22; // eax@38 unsigned int v23; // eax@38 char v24; // zf@38 unsigned int v25; // eax@38 int v26; // esi@40 int v27; // edx@40 int v28; // eax@43 unsigned int *v29; // eax@50 char *v30; // eax@50 char *v31; // eax@50 int v32; // esi@52 int v33; // edx@52 int v34; // eax@55 unsigned int *v35; // eax@62 unsigned int v36; // ecx@62 unsigned int *v37; // edx@63 unsigned int v38; // edx@63 int v39; // ST34_4@64 int v40; // ST30_4@64 int v41; // ST2C_4@64 int v42; // ST28_4@64 int v43; // ST24_4@64 int v44; // ST20_4@64 int v45; // ST1C_4@64 int v46; // ST18_4@64 int v47; // ST14_4@64 int v48; // ST10_4@64 int v49; // ST04_4@64 unsigned int v50; // esi@64 int v51; // eax@64 unsigned int *v52; // edx@65 unsigned int v53; // edx@65 int v54; // ST1C_4@65 int v55; // ST18_4@65 int v56; // ST14_4@65 int v57; // ST10_4@65 unsigned int *v58; // edx@66 unsigned int v59; // eax@66 char *v60; // edx@66 unsigned int v62; // [sp+5Ch] [bp-8Ch]@7 __int16 v63; // [sp+72h] [bp-76h]@42 int v64; // [sp+74h] [bp-74h]@106 char v65; // [sp+7Bh] [bp-6Dh]@54 char *v66; // [sp+7Ch] [bp-6Ch]@50 unsigned int v67; // [sp+80h] [bp-68h]@38 unsigned int v68; // [sp+84h] [bp-64h]@7 unsigned int v69; // [sp+88h] [bp-60h]@1 unsigned int v70; // [sp+8Ch] [bp-5Ch]@1 char v71; // [sp+94h] [bp-54h]@25 signed int v72; // [sp+D8h] [bp-10h]@1 v72 = 43643; v4 = a3; v5 = a2; v70 = 0; v69 = a2 >> 1; while ( 1 ) { v6 = *(_WORD *)v4; if ( !*(_WORD *)v4 ) break; v64 = v69 - 1; if ( v70 >= v69 - 1 ) break; if ( v6 == 37 ) { v62 = 0; v68 = 0; while ( 2 ) { v4 += 2; v7 = *(_WORD *)v4; switch ( v7 ) { case 45: v62 |= 1u; continue; case 43: v62 |= 2u; continue; case 32: v62 |= 4u; continue; case 44: v62 |= 8u; continue; case 76: case 108: v62 |= 0x10u; continue; case 42: v8 = a4; ++a4; v68 = *v8; continue; case 48: v62 |= 0x20u; goto LABEL_16; case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: LABEL_16: v68 = 0; while ( 1 ) { v4 += 2; v68 = v7 + 10 * v68 - 48; LOWORD(v7) = *(_WORD *)v4; if ( (unsigned __int16)(*(_WORD *)v4 - 48) > 9u ) break; v7 = (unsigned __int16)v7; } v4 -= 2; continue; default: switch ( *(_WORD *)v4 ) { case 0x58: LOBYTE(v62) = v62 | 0x20; v68 = 16; goto LABEL_22; case 0x78: LABEL_22: if ( v62 & 0x10 ) { v9 = a4; a4 += 2; v10 = *v9; v11 = v9[1]; } else { v12 = a4; ++a4; v10 = *v12; v11 = 0; } sub_BC21((int)&v71, v10, v11, v62, v68); v13 = v70; v14 = a1 + 2 * v70; for ( i = &v71; *(_WORD *)i; i += 2 ) { v14 += 2; if ( v13 == v64 ) break; *(_WORD *)(v14 - 2) = *(_WORD *)i; ++v13; } goto LABEL_103; case 0x64: if ( v62 & 0x10 ) { v16 = a4; a4 += 2; v17 = *v16; v18 = v16[1]; } else { v19 = (int *)a4; ++a4; v17 = *v19; v18 = 0; } sub_BCF9((int)&v71, v17, v18, v62, v68); v20 = a1 + 2 * v70; v13 = v70; for ( j = &v71; *(_WORD *)j; j += 2 ) { v20 += 2; if ( v13 == v64 ) break; *(_WORD *)(v20 - 2) = *(_WORD *)j; ++v13; } goto LABEL_103; case 0x53: case 0x73: v22 = a4; ++a4; v23 = *v22; v67 = v23; v24 = v23 == 0; v25 = (unsigned int)L"oller\n"; if ( !v24 ) v25 = v67; v26 = a1 + 2 * v70; v27 = 0; while ( 1 ) { v13 = v27 + v70; v63 = *(_WORD *)(v25 + 2 * v27); if ( !*(_WORD *)(v25 + 2 * v27) ) break; v26 += 2; if ( v27 == v64 - v70 ) break; ++v27; *(_WORD *)(v26 - 2) = v63; } v28 = a1 + 2 * v13; while ( v27 < v68 ) { v28 += 2; if ( v64 <= (unsigned int)v13 ) break; *(_WORD *)(v28 - 2) = 32; ++v13; ++v27; } goto LABEL_103; case 0x61: v29 = a4; ++a4; v30 = (char *)*v29; v66 = v30; v24 = v30 == 0; v31 = "/No Device"; if ( !v24 ) v31 = v66; v32 = a1 + 2 * v70; v33 = 0; while ( 1 ) { v13 = v33 + v70; v65 = v31[v33]; if ( !v31[v33] ) break; v32 += 2; if ( v33 == v64 - v70 ) break; ++v33; *(_WORD *)(v32 - 2) = (unsigned __int8)v65; } v34 = a1 + 2 * v13; while ( v33 < v68 ) { v34 += 2; if ( v64 <= (unsigned int)v13 ) break; *(_WORD *)(v34 - 2) = 32; ++v13; ++v33; } goto LABEL_103; case 0x63: v35 = a4; ++a4; *(_WORD *)(a1 + 2 * v70) = *v35; v36 = v70; break; case 0x67: v37 = a4; v13 = v70; ++a4; v38 = *v37; if ( !v38 ) goto LABEL_103; v39 = *(_BYTE *)(v38 + 15); v40 = *(_BYTE *)(v38 + 14); v41 = *(_BYTE *)(v38 + 13); v42 = *(_BYTE *)(v38 + 12); v43 = *(_BYTE *)(v38 + 11); v44 = *(_BYTE *)(v38 + 10); v45 = *(_BYTE *)(v38 + 9); v46 = *(_BYTE *)(v38 + 8); v47 = *(_WORD *)(v38 + 6); v48 = *(_WORD *)(v38 + 4); v49 = v5; v50 = v70; v51 = sub_B3BF(a1 + 2 * v70, v49, (int)L"ogrammable Interrupt Controller\n", *(_DWORD *)v38); goto LABEL_99; case 0x74: v52 = a4; ++a4; v53 = *v52; v54 = *(_BYTE *)(v53 + 5); v55 = *(_BYTE *)(v53 + 4); v56 = *(_WORD *)v53; v57 = *(_BYTE *)(v53 + 3); v13 = sub_B3BF( a1 + 2 * v70, v5, (int)L"\u7200\u6f00\u6700\u7200\u6100\u6d00\u6d00\u6100\u6200\u6c00\u6500\u2000\u4900\u6e00\u7400\u6500\u7200\u7200\u7500\u7000\u7400\u2000\u4300\u6f00\u6e00\u7400\u7200\u6f00\u6c00\u6c00\u6500\u7200\u0a00", *(_BYTE *)(v53 + 2)) + v70 - 1; goto LABEL_103; case 0x72: v58 = a4; ++a4; v59 = *v58; v60 = byte_CB71; if ( !v59 ) goto LABEL_96; v60 = byte_CB79; if ( v59 == -2147483647 ) goto LABEL_96; v60 = (char *)dword_CB84; if ( v59 == -2147483646 ) goto LABEL_96; v60 = " number: %s (size: %d)\n"; if ( v59 == -2147483645 ) goto LABEL_96; v60 = "(size: %d)\n"; if ( v59 == -2147483644 ) goto LABEL_96; v60 = "lid char %c\n"; if ( v59 == -2147483643 ) goto LABEL_96; v60 = "alid checksum: %d (modulo 34 is %d)\n"; if ( v59 == -2147483642 ) goto LABEL_96; v60 = "sum: %d (modulo 34 is %d)\n"; if ( v59 == -2147483641 ) goto LABEL_96; v60 = "ulo 34 is %d)\n"; if ( v59 == -2147483640 ) goto LABEL_96; v60 = "nvalid size %d\n"; if ( v59 == -2147483639 ) goto LABEL_96; v60 = &byte_CBFB; if ( v59 == -2147483638 ) goto LABEL_96; v60 = " number: all letters have the same char (%c)\n"; if ( v59 == -2147483637 ) goto LABEL_96; v60 = " letters have the same char (%c)\n"; if ( v59 == -2147483636 ) goto LABEL_96; v60 = "have the same char (%c)\n"; if ( v59 == -2147483635 ) goto LABEL_96; v60 = "char (%c)\n"; if ( v59 == -2147483634 ) goto LABEL_96; v60 = ""; if ( v59 == -2147483633 ) goto LABEL_96; v60 = "000000"; if ( v59 == -2147483632 ) goto LABEL_96; v60 = "%02d_%02d-%02d_%02d_%02d"; if ( v59 == -2147483631 ) goto LABEL_96; v60 = "02d_%02d_%02d"; if ( v59 == -2147483630 ) goto LABEL_96; v60 = "%02d"; if ( v59 == -2147483629 ) goto LABEL_96; v60 = "d%02d%02d%02d%02d"; if ( v59 == -2147483628 ) goto LABEL_96; v60 = "d"; if ( v59 == -2147483627 ) goto LABEL_96; v60 = " unload driver it has an invalid FilePath\n"; if ( v59 == -2147483626 ) goto LABEL_96; v60 = "ver it has an invalid FilePath\n"; if ( v59 == -2147483625 ) goto LABEL_96; v60 = "an invalid FilePath\n"; if ( v59 == -2147483624 ) goto LABEL_96; v60 = "Path\n"; if ( v59 == 1 ) goto LABEL_96; v60 = (char *)dword_CCC4; if ( v59 == 2 ) goto LABEL_96; v60 = (char *)&unk_CCDB; if ( v59 == 3 ) goto LABEL_96; if ( v59 == 4 ) { v60 = "iver it has an invalid FilePath\n"; LABEL_96: v51 = sub_B3BF(a1 + 2 * v70, v5, (int)L"neric 8237 DMA controller\n", (char)v60); } else { v51 = sub_B3BF(a1 + 2 * v70, v5, (int)&aNeric8237DmaCo[3], v59); } v50 = v70; LABEL_99: v13 = v51 + v50 - 1; goto LABEL_103; case 0x25: v36 = v70; *(_WORD *)(a1 + 2 * v70) = 37; break; default: *(_WORD *)(a1 + 2 * v70) = *(_WORD *)v4; v36 = v70; break; } v13 = v36 + 1; LABEL_103: v70 = v13; v5 = a2 - 2 * v13; break; } break; } } else { if ( v6 == 10 && v70 < v69 - 2 ) { v5 -= 2; *(_WORD *)(a1 + 2 * v70++) = 13; v6 = *(_WORD *)v4; } v5 -= 2; *(_WORD *)(a1 + 2 * v70++) = v6; } v4 += 2; } *(_WORD *)(a1 + 2 * v70) = 0; return (signed int)(2 * v70 + 2) >> 1; } // CB84: using guessed type int dword_CB84[4]; // CBFB: using guessed type char byte_CBFB; // CCC4: using guessed type int dword_CCC4[5]; // EA88: using guessed type __int16 aOller[7]; // EAA4: using guessed type __int16 aOgrammableInte[33]; // EAEC: using guessed type __int16 aSaProgrammable[38]; // EB3C: using guessed type __int16 aNeric8237DmaCo[27]; //----- (0000B3BF) -------------------------------------------------------- int __cdecl sub_B3BF(int a1, int a2, int a3, char a4) { return sub_AA70(a1, a2, a3, (unsigned int *)&a4); } //----- (0000B563) -------------------------------------------------------- int __cdecl sub_B563(int a1, char a2) { int v2; // esi@1 int v3; // eax@1 char v5; // [sp+1Ch] [bp-29Ch]@1 char *v6; // [sp+29Ch] [bp-1Ch]@1 v6 = &a2; v2 = sub_AA70((int)&v5, 0x280u, a1, (unsigned int *)&a2); v3 = *(_DWORD *)(unk_0 + 44); if ( v3 ) (*(void (__cdecl **)(int, char *))(v3 + 4))(v3, &v5); return v2; } //----- (0000B631) -------------------------------------------------------- signed int __cdecl sub_B631(int a1, int a2) { signed int v2; // edx@1 v2 = 1; do { if ( *(_BYTE *)(a1 + v2 - 1) != *(_BYTE *)(a2 + v2 - 1) ) return 0; ++v2; } while ( v2 != 17 ); return 1; } //----- (0000B65D) -------------------------------------------------------- int __cdecl sub_B65D(int a1, int a2) { int v2; // ecx@1 int v3; // edx@1 int result; // eax@3 v2 = a1; v3 = a2; while ( 1 ) { result = *(_WORD *)v3; if ( !(_WORD)result ) break; *(_WORD *)v2 = result; v3 += 2; v2 += 2; } *(_WORD *)v2 = 0; return result; } //----- (0000B680) -------------------------------------------------------- int __cdecl sub_B680(int a1) { int result; // eax@1 for ( result = 0; *(_WORD *)(a1 + 2 * result); ++result ) ; return result; } //----- (0000B694) -------------------------------------------------------- int __cdecl sub_B694(unsigned __int16 *a1, int a2) { unsigned __int16 *v2; // edx@1 int i; // ecx@1 unsigned __int16 v4; // ax@4 v2 = a1; for ( i = a2; ; i += 2 ) { v4 = *v2; if ( !*v2 || v4 != *(_WORD *)i ) break; ++v2; } return v4 - *(_WORD *)i; } //----- (0000B708) -------------------------------------------------------- int __cdecl sub_B708(int a1) { int result; // eax@1 for ( result = 0; *(_BYTE *)(result + a1); ++result ) ; return result; } //----- (0000B71B) -------------------------------------------------------- int __cdecl sub_B71B(int a1, int a2) { int v2; // eax@1 int i; // ecx@1 v2 = a1; for ( i = a2; *(_BYTE *)i; *(_BYTE *)v2++ = *(_BYTE *)i++ ) ; *(_BYTE *)v2 = 0; return v2 + 1; } //----- (0000B8EA) -------------------------------------------------------- int __cdecl sub_B8EA(int a1) { int i; // eax@1 for ( i = 0; *(_WORD *)(a1 + 2 * i); ++i ) ; return 2 * i + 2; } //----- (0000BACB) -------------------------------------------------------- int __cdecl sub_BACB(int a1, int a2) { int v2; // eax@1 int v3; // ecx@1 int i; // edx@4 int result; // eax@6 v2 = 0; v3 = a2; while ( *(_WORD *)(a1 + 2 * v2) ) ++v2; for ( i = a1 + 2 * v2; ; i += 2 ) { result = *(_WORD *)v3; if ( !(_WORD)result ) break; *(_WORD *)i = result; v3 += 2; } *(_WORD *)i = 0; return result; } //----- (0000BC21) -------------------------------------------------------- int __cdecl sub_BC21(int a1, unsigned int a2, unsigned int a3, char a4, unsigned int a5) { signed int v5; // eax@1 unsigned int v6; // edx@1 unsigned int v7; // esi@3 unsigned int v8; // ecx@3 unsigned __int64 v9; // rax@4 unsigned __int64 v10; // kr08_8@4 char *v11; // ecx@5 unsigned int v12; // eax@5 signed int v13; // edx@5 int v14; // edx@12 int result; // eax@15 char *v16; // [sp+1Ch] [bp-5Ch]@3 char v17[84]; // [sp+24h] [bp-54h]@4 signed int v18; // [sp+68h] [bp-10h]@1 unsigned int v19; // [sp+90h] [bp+18h]@3 v5 = 29; v18 = 48177; v6 = a2; if ( a5 < 0x1E ) v5 = a5; v7 = 0; v8 = a3; v19 = v5; v16 = (char *)&dword_F010[-12044] + v18 - 1; do { *(_WORD *)&v17[2 * v7++] = *(_WORD *)&v16[2 * (v6 & 0xF)]; v9 = sub_BEC7(__PAIR__(v8, v6), 4); v10 = v9; v8 = v10 >> 32; v6 = v10; } while ( __PAIR__(v8, (unsigned int)v9) ); v11 = &v17[2 * v7]; v12 = v7; v13 = (a4 & 0x20u) < 1 ? 32 : 48; if ( !(a4 & 1) ) { while ( v12 < v19 ) { *(_WORD *)v11 = v13; ++v12; v11 += 2; } } if ( v19 && (v11 - v17) >> 1 > v19 ) v11 = &v17[2 * v19]; v14 = 0; while ( v17 != v11 ) { v11 -= 2; *(_WORD *)(a1 + 2 * v14++) = *(_WORD *)v11; } result = v14; *(_WORD *)(a1 + 2 * v14) = 0; return result; } // F010: using guessed type int dword_F010[48]; // BC21: using guessed type char var_54[84]; //----- (0000BCF9) -------------------------------------------------------- int __cdecl sub_BCF9(int a1, int a2, int a3, unsigned int a4, unsigned int a5) { signed int v5; // eax@1 char *v6; // ecx@6 int v7; // eax@13 int v8; // edx@20 unsigned __int64 v10; // [sp+20h] [bp-68h]@1 char *v11; // [sp+28h] [bp-60h]@5 int v12; // [sp+2Ch] [bp-5Ch]@5 unsigned int v13; // [sp+30h] [bp-58h]@5 char v14; // [sp+37h] [bp-51h]@1 int v15; // [sp+3Ch] [bp-4Ch]@6 char v16[60]; // [sp+40h] [bp-48h]@5 __int16 v17; // [sp+7Ch] [bp-Ch]@6 unsigned int v18; // [sp+A0h] [bp+18h]@3 v14 = 0; LODWORD(v10) = a2; v5 = 29; if ( a5 < 0x1E ) v5 = a5; HIDWORD(v10) = a3; v18 = v5; if ( a3 < 0 ) { v10 = -(signed __int64)v10; v14 = 1; } v11 = v16; v12 = 0; v13 = 0; while ( 1 ) { v10 = sub_BEE3(v10, 0xAu, (int)&v17); *(_WORD *)v11 = v17 + 48; v6 = v11 + 2; ++v13; v15 = v12 + 1; if ( (a4 >> 3) & 1 && (v13 == 3 * (v13 / 3)) & (__PAIR__(v10, HIDWORD(v10)) != 0) ) { *((_WORD *)v11 + 1) = 44; v6 = v11 + 4; v15 = v12 + 2; } if ( !__PAIR__(v10, HIDWORD(v10)) ) break; v11 = v6; v12 = v15; } if ( v14 ) { *(_WORD *)v6 = 45; v6 += 2; ++v15; } v7 = v15; if ( !(a4 & 1) ) { while ( v18 > v7 ) { *(_WORD *)v6 = ((a4 >> 5) & (unsigned __int8)(v14 ^ 1)) < 1 ? 32 : 48; ++v7; v6 += 2; } } if ( v18 && v18 < (v6 - v16) >> 1 ) v6 = &v16[2 * v18]; v8 = 0; while ( v16 != v6 ) { v6 -= 2; *(_WORD *)(a1 + 2 * v8++) = *(_WORD *)v6; } *(_WORD *)(a1 + 2 * v8) = 0; return v8; } // BCF9: using guessed type char var_48[60]; //----- (0000BEC7) -------------------------------------------------------- unsigned __int64 __cdecl sub_BEC7(unsigned __int64 a1, char a2) { return a1 >> a2; } //----- (0000BEE3) -------------------------------------------------------- unsigned __int64 __cdecl sub_BEE3(unsigned __int64 a1, unsigned int a2, int a3) { unsigned int v3; // esi@2 if ( a3 ) { v3 = a2; *(_DWORD *)a3 = sub_C120(a1, a2); } else { v3 = a2; } return sub_BFD0(a1, v3, 0); } //----- (0000BFD0) -------------------------------------------------------- unsigned __int64 __cdecl sub_BFD0(unsigned __int64 a1, unsigned int a2, unsigned int a3) { unsigned int v3; // ecx@1 signed int v5; // ecx@3 unsigned __int64 result; // rax@4 int v12; // edi@7 unsigned __int64 v13; // rtt@7 signed int v14; // edi@7 unsigned __int64 v15; // rax@7 unsigned __int64 v16; // rtt@11 unsigned int v17; // [sp+4h] [bp-24h]@7 char v18; // [sp+18h] [bp-10h]@6 v3 = a2; _EDI = a3; if ( a3 ) { if ( a3 <= HIDWORD(a1) ) { __asm { bsr eax, edi } v18 = _EAX ^ 0x1F; if ( _EAX ^ 0x1F ) { v12 = (a2 >> (32 - v18)) | (a3 << v18); LODWORD(v13) = ((unsigned int)a1 >> (32 - v18)) | (HIDWORD(a1) << v18); HIDWORD(v13) = HIDWORD(a1) >> (32 - v18); v17 = v13 % (unsigned int)v12; v14 = v13 / (unsigned int)v12; v15 = (a2 << v18) * (unsigned __int64)(unsigned int)v14; if ( v17 >= HIDWORD(v15) ) { v5 = v14; if ( v17 != HIDWORD(v15) || (_DWORD)a1 << v18 >= (unsigned int)v15 ) return (unsigned int)v5; } return (unsigned int)(v14 - 1); } v5 = 1; if ( a2 <= (unsigned int)a1 || a3 < HIDWORD(a1) ) return (unsigned int)v5; } return 0i64; } if ( a2 > HIDWORD(a1) ) { v5 = a1 / a2; return (unsigned int)v5; } if ( !a2 ) v3 = 1 / 0u; LODWORD(v16) = a1; HIDWORD(v16) = HIDWORD(a1) % v3; HIDWORD(result) = HIDWORD(a1) / v3; LODWORD(result) = v16 / v3; return result; } //----- (0000C120) -------------------------------------------------------- int __cdecl sub_C120(unsigned __int64 a1, __int64 a2) { unsigned int v2; // ecx@1 unsigned __int64 v3; // rtt@4 int result; // eax@4 unsigned __int64 v10; // rtt@13 unsigned __int64 v11; // rax@13 unsigned int v12; // ecx@13 unsigned int v13; // esi@13 int v14; // [sp+8h] [bp-28h]@1 char v15; // [sp+14h] [bp-1Ch]@7 unsigned int v16; // [sp+18h] [bp-18h]@13 int v17; // [sp+1Ch] [bp-14h]@1 unsigned int v18; // [sp+20h] [bp-10h]@13 unsigned int v19; // [sp+24h] [bp-Ch]@13 v14 = HIDWORD(a2); v2 = a2; v17 = a1; if ( HIDWORD(a2) ) { result = a1; if ( HIDWORD(a2) <= HIDWORD(a1) ) { __asm { bsr eax, dword ptr [ebp+var_2C+4] } v15 = _EAX ^ 0x1F; if ( _EAX ^ 0x1F ) { v19 = ((unsigned int)a2 >> (32 - v15)) | (HIDWORD(a2) << v15); v18 = (_DWORD)a1 << v15; LODWORD(v10) = ((unsigned int)a1 >> (32 - v15)) | (HIDWORD(a1) << v15); HIDWORD(v10) = HIDWORD(a1) >> (32 - v15); v16 = v10 % v19; v11 = ((_DWORD)a2 << v15) * (unsigned __int64)(unsigned int)(v10 / v19); v12 = HIDWORD(v11); v13 = ((_DWORD)a2 << v15) * (v10 / v19); if ( v16 < HIDWORD(v11) || v16 == HIDWORD(v11) && v18 < (unsigned int)v11 ) { v12 = (__PAIR__(HIDWORD(v11), v13) - __PAIR__(v19, (_DWORD)a2 << v15)) >> 32; v13 -= (_DWORD)a2 << v15; } result = ((__PAIR__(v16, v18) - __PAIR__(v12, v13)) >> 32 << (32 - v15)) | ((v18 - v13) >> v15); } else { if ( (unsigned int)a2 <= (unsigned int)a1 || HIDWORD(a2) < HIDWORD(a1) ) v17 = a1 - a2; result = v17; } } } else if ( (unsigned int)a2 > HIDWORD(a1) ) { result = a1 % (unsigned int)a2; } else { if ( !(_DWORD)a2 ) v2 = 1 / 0u; LODWORD(v3) = a1; HIDWORD(v3) = __PAIR__(HIDWORD(a2), HIDWORD(a1)) % v2; result = v3 % v2; } return result; } //----- (00012590) -------------------------------------------------------- int __fastcall sub_12590(int a1, int a2) { int v3; // et1@2 int v5; // et1@3 int v7; // [sp+68h] [bp-8h]@3 if ( (unsigned int)(a2 - 1) <= 7 ) { _EDX = 4 * (a2 - 2); v3 = *(int *)((char *)&off_15 + _EDX + 1); __asm { arpl ax, dx } JUMPOUT(__CS__, &byte_9[_EDX - 1]); } v5 = *(_DWORD *)(a1 + 24); ((void (__fastcall *)(int, signed int))(a1 + 1))(a1 + 1, 1296843359); if ( v7 - 1 >= 0 ) sub_173E1(1296843359); else sub_17431((char *)0x4D4C425F); return v7; } // 15: using guessed type int (*off_15)[6]; //----- (00014282) -------------------------------------------------------- int __usercall sub_14282@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4@<ebp>) { int v4; // et1@1 int v5; // eax@1 int v6; // et1@4 unsigned int v7; // ecx@4 int v8; // eax@4 int v9; // et1@5 unsigned int v10; // ecx@5 int v11; // eax@5 int v12; // et1@7 unsigned int v13; // ecx@7 int v14; // eax@7 int v15; // et1@9 unsigned int v16; // ecx@9 int v17; // eax@9 int v18; // et1@10 int v19; // et1@10 int v20; // edx@10 int v21; // eax@10 *(_DWORD *)(a4 + 16) = a3; *(_DWORD *)(a4 + 24) = a2; *(_DWORD *)(a4 + 32) = a1 - 3; *(_DWORD *)(a4 + 40) = a3; *(_DWORD *)(a4 - 16) = ((int (__fastcall *)(_DWORD))(*(_DWORD *)(*(int *)((char *)&dword_10000[282] + 3) - 1) - 1))(*(int *)((char *)&dword_10000[280] + 1)); v4 = *(_DWORD *)(*(int *)((char *)&dword_10000[277] + 1) + 8); v5 = *(_DWORD *)(a4 - 16) - 2; *(_DWORD *)(a4 - 24) = ((int (__fastcall *)(_DWORD))(a4 - 288))(0) - 1; if ( *(_DWORD *)(a4 - 24) - 1 >= 0 ) { *(_DWORD *)(a4 - 8) = (*(_BYTE *)(a4 - 214) << 16) + (*(_BYTE *)(a4 - 215) << 8) + *(_BYTE *)(a4 - 216) + (*(_BYTE *)(a4 - 213) << 24); *(_DWORD *)(a4 - 12) = (*(_BYTE *)(a4 - 210) << 16) + (*(_BYTE *)(a4 - 211) << 8) + *(_BYTE *)(a4 - 212) + (*(_BYTE *)(a4 - 209) << 24); *(_DWORD *)(a4 - 4) = (*(_BYTE *)(a4 - 218) << 16) + (*(_BYTE *)(a4 - 219) << 8) + *(_BYTE *)(a4 - 220) + (*(_BYTE *)(a4 - 217) << 24); if ( *(_DWORD *)(a4 + 40) ) { v6 = *(_DWORD *)(a4 + 24); v7 = **(_DWORD **)(a4 + 32); *(_DWORD *)(a4 - 324) = -2139062143; *(_DWORD *)(a4 - 304) = (unsigned int)(v7 * (unsigned __int64)*(_DWORD *)(a4 - 324) >> 32) >> 7; v8 = 255 * *(_DWORD *)(a4 - 304); *(_DWORD *)(a4 - 304) = v7 - v8; *(_BYTE *)(a4 - 288 + v8) = *(_BYTE *)(a4 - 304); if ( *(_DWORD *)(a4 + 40) > 1u ) { v9 = *(_DWORD *)(a4 + 24); v10 = **(_DWORD **)(a4 + 32) >> 8; *(_DWORD *)(a4 - 324) = -2139062143; *(_DWORD *)(a4 - 300) = (unsigned int)(v10 * (unsigned __int64)*(_DWORD *)(a4 - 324) >> 32) >> 7; v11 = 255 * *(_DWORD *)(a4 - 300); *(_DWORD *)(a4 - 300) = v10 - v11; *(_BYTE *)(a4 - 288 + v11) = *(_BYTE *)(a4 - 300); } if ( *(_DWORD *)(a4 + 40) > 2u ) { v12 = *(_DWORD *)(a4 + 24); v13 = **(_DWORD **)(a4 + 32) >> 16; *(_DWORD *)(a4 - 324) = -2139062143; *(_DWORD *)(a4 - 296) = (unsigned int)(v13 * (unsigned __int64)*(_DWORD *)(a4 - 324) >> 32) >> 7; v14 = 255 * *(_DWORD *)(a4 - 296); *(_DWORD *)(a4 - 296) = v13 - v14; *(_BYTE *)(a4 - 288 + v14) = *(_BYTE *)(a4 - 296); } if ( *(_DWORD *)(a4 + 40) > 3u ) { v15 = *(_DWORD *)(a4 + 24); v16 = **(_DWORD **)(a4 + 32) >> 24; *(_DWORD *)(a4 - 324) = -2139062143; *(_DWORD *)(a4 - 292) = (unsigned int)(v16 * (unsigned __int64)*(_DWORD *)(a4 - 324) >> 32) >> 7; v17 = 255 * *(_DWORD *)(a4 - 292); *(_DWORD *)(a4 - 292) = v16 - v17; *(_BYTE *)(a4 - 288 + v17) = *(_BYTE *)(a4 - 292); } v18 = *(_DWORD *)(*(int *)((char *)&dword_10000[121] + 1) + 16); v19 = *(_DWORD *)(a4 + 24); v20 = *(_DWORD *)(a4 + 24) - 2 + a4 - 288; v21 = *(_DWORD *)(a4-- + 24) - 3; ((void (__fastcall *)(int))v20)(v21 + 2); } else { **(_DWORD **)(a4 + 32) = (*(_BYTE *)(a4 - 288 + *(_DWORD *)(a4 + 24) + 2) << 16) + (*(_BYTE *)(a4 - 288 + *(_DWORD *)(a4 + 24) + 1) << 8) + *(_BYTE *)(a4 - 288 + *(_DWORD *)(a4 + 24)) + (*(_BYTE *)(a4 - 288 + *(_DWORD *)(a4 + 24) + 3) << 24); } *(_DWORD *)(a4 - 312) = *(_DWORD *)(a4 - 24) - 1; } else { *(_DWORD *)(a4 - 312) = *(_DWORD *)(a4 - 24) - 1; } return *(_DWORD *)(a4 - 312); } // 10000: using guessed type int dword_10000[640]; //----- (00014DDA) -------------------------------------------------------- // write access to const memory has been detected, the output may be wrong! int *__fastcall sub_14DDA(int a1) { int *result; // eax@4 int v3; // [sp+Ch] [bp-14h]@2 int i; // [sp+1Ch] [bp-4h]@4 if ( a1 ) v3 = a1; else v3 = 5489; result = (int *)v3; *(int *)((char *)&dword_FA94[97] + 3) = v3; for ( i = 1; i <= 623; ++i ) { _EAX = i; __asm { arpl ax, ax } dword_FA94[_EAX - 1 + 72] = 1812433253 * ((dword_FA94[(signed __int16)(i - 2) - 1 + 89] ^ (*(unsigned int *)((char *)&dword_FA94[(signed __int16)(i - 2) - 1 + 82] + 3) >> 30)) - 1) + i - 1; result = &i; } dword_FA94[33] = 1; return result; } // 14DFD: write access to const memory at FC1B has been detected // 14E7C: write access to const memory at FB18 has been detected // FA94: using guessed type int dword_FA94[104]; //----- (0001510C) -------------------------------------------------------- bool __fastcall sub_1510C(int a1) { int v1; // eax@2 int v4; // [sp+6Ch] [bp-24h]@1 int v5; // [sp+70h] [bp-20h]@1 int v6; // [sp+74h] [bp-1Ch]@1 int i; // [sp+78h] [bp-18h]@1 char v8; // [sp+7Fh] [bp-11h]@2 int v9; // [sp+80h] [bp-10h]@2 int v10; // [sp+8Ch] [bp-4h]@4 int v14; // [sp+A0h] [bp+10h]@1 v14 = a1; v4 = sub_182C1(a1); v5 = 34; v6 = 0; for ( i = 0; i < v4; ++i ) { v8 = *(_BYTE *)(v14 + (signed __int16)(v4 - i - 1) - 1 - 2); v1 = sub_17E2E(); v9 = v1 - 1; if ( v1 == 1 ) return 0; v10 = v9 - (_DWORD)&unk_F6B8; if ( i & 1 ) v6 += 3 * v10; else v6 += v10; } return v6 % *(int *)((char *)&v4 + 3) == 0; } // F6C4: using guessed type int[11]; //----- (0001590E) -------------------------------------------------------- // write access to const memory has been detected, the output may be wrong! int __usercall sub_1590E@<eax>(int a1@<ecx>, unsigned int a2@<ebx>, int a3@<edi>, int a4@<esi>) { int v4; // et1@1 int v5; // eax@1 int v6; // et1@2 int v7; // eax@2 int v8; // et1@6 int v9; // eax@6 int v10; // eax@24 int v11; // eax@30 int v12; // eax@40 int v13; // et1@43 int v15; // [sp+0h] [bp-398h]@0 int v16; // [sp+4h] [bp-394h]@0 int v17; // [sp+8h] [bp-390h]@0 __int64 v18; // [sp+Ch] [bp-38Ch]@0 int v19; // [sp+14h] [bp-384h]@0 int v20; // [sp+18h] [bp-380h]@0 int v21; // [sp+50h] [bp-348h]@3 unsigned int v22; // [sp+54h] [bp-344h]@5 char v23[256]; // [sp+58h] [bp-340h]@20 char v24[256]; // [sp+59h] [bp-33Fh]@38 __int16 v25; // [sp+158h] [bp-240h]@19 int v26; // [sp+358h] [bp-40h]@4 int v27; // [sp+360h] [bp-38h]@1 int v28; // [sp+368h] [bp-30h]@1 int i; // [sp+370h] [bp-28h]@8 int j; // [sp+378h] [bp-20h]@20 char v31; // [sp+37Fh] [bp-19h]@1 int v32; // [sp+380h] [bp-18h]@30 int v36; // [sp+3A8h] [bp+10h]@1 v36 = a1; v27 = 0; v31 = 0; v4 = *(_DWORD *)(*(int *)((char *)&dword_EF40[18] + 3) + 320); v5 = ((int (__fastcall *)(char *, _DWORD))((char *)&dword_EF40[3] + 1))((char *)&dword_EF40[3] + 1, 0); v28 = v5 - 1; if ( v5 != 1 ) { v6 = *(_DWORD *)(*(int *)((char *)&dword_EF40[4] + 2) + 152); v7 = ((int (__fastcall *)(int, char *))(v36 + 1))(v36 + 1, (char *)&dword_EFBC[3] + 3); v28 = v7 - 1; if ( v7 != 1 ) { v21 = v28 - 1; return v21 - 1; } if ( *(_DWORD *)(v26 - 1 + 32) == 1 ) { sub_16F2C(0, v15, v16, v17, v18, SHIDWORD(v18), v19, v20); v21 = 2; v22 = 2147483648; return v21 - 1; } v8 = *(_DWORD *)(*(_DWORD *)&a8x04x04x02x02x[17] + 152); v9 = (*(int (__fastcall **)(_DWORD, char *))(v26 - 1 + 24))( *(_DWORD *)(v26 - 1 + 24), (char *)&a8x04x04x02x02x[41] + 1); v28 = v9 - 1; if ( v9 != 1 ) { v21 = v28 - 1; return v21 - 1; } for ( i = v27 - 1; (*(_BYTE *)i & 0x7F) != 127 || *(_BYTE *)(i + 1) != -1; i = (signed __int16)((*(_BYTE *)(i + 2) | (unsigned __int16)(*(_BYTE *)(i + 3) << 8)) - 1) - 1 + i - 1 - 1 ) { if ( (*(_BYTE *)i & 0x7F) == 3 && (*(_BYTE *)(i + 1) == 11 || *(_BYTE *)(i + 1) == 12) ) { v27 = sub_1B60F(v27, *(_DWORD *)(v26 - 1 + 32)) - 1; sub_19600(v27, 0); v31 = 1; a4 = *(_DWORD *)(*(_DWORD *)((char *)&aRewireIeee1394[17] + 1) - 1 + 88); a2 = v27; sub_1B38D(v27); v28 = ((int (__fastcall *)(char *, _UNKNOWN *))a4)((char *)&loc_97BA + 2, &unk_EDBB) - 1; ((void (__fastcall *)(int))(*(_DWORD *)(*(_DWORD *)&aSerialBusContr[21] - 1 + 72) - 1))(v27); break; } } if ( !v31 ) { a4 = *(_DWORD *)(*(_DWORD *)&aNtium[0] - 1 + 88); a2 = v27; sub_1B38D(v27); v28 = ((int (__fastcall *)(char *, __int16 *))a4)( (char *)&loc_970F + 2, L"\u4400\u6f00\u6300\u6b00\u6900\u6e00\u6700\u2000\u5300\u7400\u6100\u7400\u6900\u6f00\u6e00\u7300\u2c00\u2000") - 1; } if ( !v28 ) { if ( sub_19600(*(_DWORD *)(v26 - 1 + 32), (int)&v25) ) { v23[0] = 0; v28 = (signed __int16)(sub_164EA((int)((char *)&loc_82CC + 3), (int)sub_7AE2) - 1) - 1; } else { sub_17A4E(256, (int)v23, (int)((char *)&v25 + 1), v15, v16, v17, v18); for ( j = 0; ; ++j ) { v10 = sub_182C1((int)v23); if ( v10 <= j ) break; if ( v23[(signed __int16)(j - 1)] == 92 ) v23[(signed __int16)(j - 1)] = 47; } if ( sub_1820F((int)v23, (int)((char *)&loc_83BD + 2)) && sub_17EEE((int)v23, (int)((char *)&loc_83A9 + 1)) == 1 && sub_17EEE((int)v23, (int)&loc_8399) == 1 && v23[sub_182C1((int)v23) - 2] != 47 ) sub_17D51((int)v23, (int)((char *)&loc_835C + 1)); v11 = sub_17E56((int)v23, 47); v32 = v11 - 1; if ( v11 != 1 ) { ++*(_DWORD *)&v31; *(_BYTE *)v32 = 0; } if ( v23[sub_182C1((int)v23) - 2] != 47 ) sub_17D51((int)v23, (int)((char *)&loc_8304 + 1)); if ( sub_182C1((int)v23) != 1 ) v28 = (signed __int16)(sub_164EA((int)((char *)&loc_82E8 + 9), (int)v23) - 1) - 1; } } if ( v31 ) { sub_17D51((int)v23, (int)&loc_82C0); sub_179D7(256, (int)&v25, (int)v24, v15, v16, v17, v18); } else { v25 = 0; } v12 = sub_1D32B((int)&v25, (int)((char *)&loc_953F + 2)) - 1; if ( !v28 ) v28 = sub_199DA( (int)L"\u4100\u2000\u5000\u7200\u6f00\u6700\u7200\u6100\u6d00\u6d00\u6100\u6200\u6c00\u6500\u2000\u4900\u6e00\u7400\u6500\u7200\u7200\u7500\u7000\u7400\u2000\u4300\u6f00\u6e00\u7400\u7200\u6f00\u6c00\u6c00\u6500\u7200\u0a00", (int)&v25, (int (__fastcall *)(_DWORD))v36, a2, a3, a4) - 1; if ( v28 ) { sub_1CCFC(0, v28, (int)((char *)&loc_94FE + 2)); } else { v13 = *(_DWORD *)(*(_DWORD *)((char *)L"rammable Interrupt Controller\n" + 1) + 320); v28 = ((int (__fastcall *)(char *, _DWORD))((char *)&unk_EAE6 + 1))((char *)&unk_EAE6 + 1, 0) - 1; } } if ( *(_DWORD *)((char *)&aOgrammableInte[1] + 1) != 1 ) *(_DWORD *)((char *)&aNeric8259Progr[33] + 1) = v36 - 1; v21 = v28 - 1; return v21 - 1; } // 15DF1: write access to const memory at EA7F has been detected // 7AE2: using guessed type int sub_7AE2(); // EA3C: using guessed type __int16 aNeric8259Progr[38]; // EAA4: using guessed type __int16 aOgrammableInte[33]; // EAEC: using guessed type __int16 aSaProgrammable[38]; // ECFC: using guessed type __int16 aDockingStation[22]; // ED70: using guessed type __int16 aNtium[7]; // EDBC: using guessed type __int16 aSerialBusContr[27]; // EDF8: using guessed type __int16 aRewireIeee1394[19]; // EEA8: using guessed type __int16 a8x04x04x02x02x[47]; // EF40: using guessed type int[20]; // EFBC: using guessed type int dword_EFBC[4]; // 1590E: using guessed type char var_340[256]; //----- (00015E60) -------------------------------------------------------- int sub_15E60() { return ((int (*)(void))(*(_DWORD *)(*(_DWORD *)((char *)&aBaseSystemPeri[13] + 1) - 1 + 64) - 2))(); } // E9FC: using guessed type __int16 aBaseSystemPeri[29]; //----- (00015E87) -------------------------------------------------------- int sub_15E87() { return ((int (*)(void))(*(_DWORD *)(*(_DWORD *)L"\u2000\u7000\u6100\u7200\u6100\u6c00\u6c00\u6500\u6c00\u2000\u7000\u6f00\u7200\u7400\u0a00" - 1 + 72) - 1))(); } // E9D0: using guessed type __int16 aP1_xParallelPo[21]; //----- (00015EA6) -------------------------------------------------------- int __fastcall sub_15EA6(int a1, int (__fastcall *a2)(_DWORD)) { int v2; // et1@1 v2 = *(_DWORD *)(*(_DWORD *)&aDirectionalPar[27] + 112); return a2(a1 + 1); } // E994: using guessed type __int16 aDirectionalPar[28]; //----- (00015F09) -------------------------------------------------------- int sub_15F09() { return ((int (*)(void))(*(_DWORD *)(*(_DWORD *)((char *)&a16550Compatabl[29] + 1) - 1 + 120) - 1))(); } // E934: using guessed type __int16 a16550Compatabl[30]; //----- (00015F2E) -------------------------------------------------------- int sub_15F2E() { return ((int (*)(void))(*(_DWORD *)(*(_DWORD *)((char *)L"\u3500\u3000\u2000\u6300\u6f00\u6d00\u7000\u6100\u7400\u6100\u6200\u6c00\u6500\u2000\u5300\u6500\u7200\u6900\u6100\u6c00\u2000\u5000\u6f00\u7200\u7400\u0a00" + 1) - 1 + 128) - 2))(); } // E934: using guessed type __int16 a16550Compatabl[30]; //----- (00015F58) -------------------------------------------------------- int sub_15F58() { return ((int (*)(void))(*(_DWORD *)(*(_DWORD *)((char *)&a16450Compatabl[21] + 1) - 1 + 136) - 1))(); } // E8F8: using guessed type __int16 a16450Compatabl[30]; //----- (00015F7A) -------------------------------------------------------- int __fastcall sub_15F7A(int a1) { int v1; // et1@1 v1 = *(_DWORD *)(*(_DWORD *)((char *)L"\u5800\u5400\u2000\u6300\u6f00\u6d00\u7000\u6100\u7400\u6100\u6200\u6c00\u6500\u2000\u5300\u6500\u7200\u6900\u6100\u6c00\u2000\u5000\u6f00\u7200\u7400\u0a00" + 1) + 144); return ((int (*)(void))(a1 + 1))(); } // E8B0: using guessed type __int16 aGenericXtCompa[36]; //----- (00015FD3) -------------------------------------------------------- int sub_15FD3() { return ((int (*)(void))(*(_DWORD *)(*(_DWORD *)L"\u2000\u4300\u6f00\u6d00\u6d00\u7500\u6e00\u6900\u6300\u6100\u7400\u6900\u6f00\u6e00\u7300\u2000\u4300\u6f00\u6e00\u7400\u7200\u6f00\u6c00\u6c00\u6500\u7200\u2c00\u2000" - 1 + 152) - 1))(); } // E864: using guessed type __int16 aSimpleCommunic[38]; //----- (000161FA) -------------------------------------------------------- int __fastcall sub_161FA(int a1) { int v1; // et1@1 v1 = *(_DWORD *)(*(_DWORD *)((char *)L"\u6300\u6f00\u6d00\u7000\u6100\u7400\u6100\u6200\u6c00\u6500\u0a00" + 1) + 320); return ((int (__fastcall *)(int))(a1 - 3))(a1 + 1); } // E668: using guessed type __int16 aACompatable[14]; //----- (000164EA) -------------------------------------------------------- unsigned int __fastcall sub_164EA(int a1, int a2) { int v2; // eax@1 int v3; // et1@4 int v4; // eax@4 int v6; // [sp+0h] [bp-260h]@0 int v7; // [sp+4h] [bp-25Ch]@0 int v8; // [sp+8h] [bp-258h]@0 __int64 v9; // [sp+Ch] [bp-254h]@0 char v10; // [sp+50h] [bp-210h]@1 int v11; // [sp+258h] [bp-8h]@2 int v17; // [sp+278h] [bp+18h]@1 v17 = a2; v2 = sub_179D7(255, (int)&v10, a1, v6, v7, v8, v9) - 1; if ( v17 ) v11 = sub_182C1(v17) - 1; else v11 = 0; v3 = *(_DWORD *)(*(_DWORD *)&aNdleprotocolEr[17] + 88); v4 = (*(int (__fastcall **)(int))L": GetVariable: We shouldn't have gotten here error: 0x%x\n")(v11 + 2); return ((unsigned int)(v4 - 2) >> 32) | (v4 - 1); } // E2A8: using guessed type __int16 aPdatedriverr_0[72]; // E358: using guessed type __int16 aNdleprotocolEr[26]; //----- (00016F2C) -------------------------------------------------------- void __usercall sub_16F2C(char a1@<al>, int a2, int a3, int a4, int a5, int a6, int a7, int a8) { JUMPOUT(__CS__, (char *)&unk_3B + -4 * ((unsigned __int8)(a1 - 2) - 1) + 3); } //----- (000173E1) -------------------------------------------------------- int __fastcall sub_173E1(int a1) { return (*(int (__fastcall **)(int))(*(_DWORD *)((char *)&aRifyTheExtende[19] + 1) + 832))(a1 + 1); } // D468: using guessed type __int16 aRifyTheExtende[43]; //----- (00017431) -------------------------------------------------------- int __fastcall sub_17431(char *a1) { int v1; // et1@1 v1 = *(_DWORD *)(*(_DWORD *)((char *)&aRifyEstBitSetT[3] + 1) + 824); return ((int (__fastcall *)(char *))a1)(a1 + 1); } // D438: using guessed type __int16 aRifyEstBitSetT[22]; //----- (000176AC) -------------------------------------------------------- int __fastcall sub_176AC(char a1) { int v1; // et1@1 v1 = *(_DWORD *)(*(int *)((char *)&dword_D1AC[5] + 3) - 1 + 8); return ((int (__fastcall *)(_DWORD))a1)(a1) - 1; } // D1AC: using guessed type int[8]; //----- (000176FE) -------------------------------------------------------- int __fastcall sub_176FE(char a1) { int v1; // et1@1 v1 = *(_DWORD *)(*(_DWORD *)((char *)&aRifyIctWasRu_0[11] + 1) - 1 + 16); return ((int (__fastcall *)(_DWORD))a1)(a1) - 1; } // D154: using guessed type __int16 aRifyIctWasRu_0[44]; //----- (00017755) -------------------------------------------------------- int sub_17755() { return (*(int (**)(void))(*(_DWORD *)&aRifyIctWasRunA[9] - 1 + 24))(); } // D118: using guessed type __int16 aRifyIctWasRunA[28]; //----- (000179D7) -------------------------------------------------------- int __usercall sub_179D7@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4, int a5, int a6, __int64 a7) { int i; // [sp+Ch] [bp-4h]@1 int v9; // [sp+20h] [bp+10h]@1 v9 = a3; HIDWORD(a7) = a2; for ( i = 0; *(_BYTE *)v9 && a1 - 5 > i; ++i ) { *HIDWORD(a7) = *(_BYTE *)v9++; *(_DWORD *)((char *)&a7 + 3) += 2; } if ( a1 - 5 > i ) *HIDWORD(a7) = 0; return a2 - 1; } //----- (00017A4E) -------------------------------------------------------- int __usercall sub_17A4E@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4, int a5, int a6, __int64 a7) { int i; // [sp+Ch] [bp-4h]@1 int v9; // [sp+20h] [bp+10h]@1 v9 = a3; HIDWORD(a7) = a2; for ( i = 0; *(_WORD *)v9 && a1 - 5 > i; ++i ) { *HIDWORD(a7) = *(_WORD *)v9; v9 += 2; ++*(_DWORD *)((char *)&a7 + 3); } if ( a1 - 5 > i ) *HIDWORD(a7) = 0; return a2 - 1; } //----- (00017B43) -------------------------------------------------------- int __fastcall sub_17B43(unsigned __int8 a1) { return ((int (__fastcall *)(_DWORD))(*(_DWORD *)(*(int *)((char *)&dword_CD14[8] + 1) - 1 + 592) - 1))(a1); } // CD14: using guessed type int dword_CD14[254]; //----- (00017D51) -------------------------------------------------------- int __fastcall sub_17D51(int a1, int a2) { int v2; // eax@4 int v4; // [sp+0h] [bp-10h]@1 int v5; // [sp+4h] [bp-Ch]@1 v4 = 0; v5 = 0; while ( *(_BYTE *)(a1 + (signed __int16)(v4 - 1) - 1) ) ++v4; do { v2 = a1 + (signed __int16)(v4 - 1) - 1; *(_BYTE *)v2 = *(_BYTE *)(a2 + (signed __int16)(v5++ - 1) - 1); ++v4; } while ( *(_BYTE *)v2 ); return a1 - 1; } //----- (00017E2E) -------------------------------------------------------- int sub_17E2E() { return ((int (*)(void))(*(_DWORD *)(*(_DWORD *)"ce" - 1 + 1120) - 1))(); } //----- (00017E56) -------------------------------------------------------- int __fastcall sub_17E56(int a1, char a2) { int v3; // [sp+0h] [bp-30h]@6 int v4; // [sp+8h] [bp-28h]@8 _BYTE v5[5]; // [sp+Fh] [bp-21h]@0 int v6; // [sp+18h] [bp-18h]@1 *(_DWORD *)&v5[1] = a1 - 3; v6 = 0; while ( 1 ) { ++*(_DWORD *)v5; if ( **(_BYTE **)&v5[1] == 1 ) break; if ( **(_BYTE **)&v5[1] - 2 == (unsigned __int8)(a2 - 1) - 1 ) v6 = *(_DWORD *)&v5[1] - 1; } if ( v6 ) { v3 = v6 - 1; } else { if ( (unsigned __int8)(a2 - 1) == 1 ) v4 = *(_DWORD *)&v5[1] - 1; else v4 = 0; v3 = v4 - 1; } return v3; } //----- (00017EEE) -------------------------------------------------------- int __fastcall sub_17EEE(int a1, int a2) { int v3; // [sp+8h] [bp-48h]@3 _BYTE v4[5]; // [sp+17h] [bp-39h]@0 _BYTE v5[5]; // [sp+1Fh] [bp-31h]@0 _BYTE v6[5]; // [sp+3Fh] [bp-11h]@0 _BYTE v7[5]; // [sp+47h] [bp-9h]@0 *(_DWORD *)&v4[1] = a1 - 3; *(_DWORD *)&v5[1] = a2 - 3; if ( a2 && (++*(_DWORD *)v5, **(_BYTE **)&v5[1] != 1) ) { while ( 1 ) { ++*(_DWORD *)v4; if ( **(_BYTE **)&v4[1] == 1 ) break; if ( **(_BYTE **)&v4[1] - 2 == **(_BYTE **)&v5[1] - 1 ) { *(_DWORD *)&v6[1] = *(_DWORD *)&v4[1] - 3; *(_DWORD *)&v7[1] = *(_DWORD *)&v5[1] - 3; do { ++*(_DWORD *)v6; ++*(_DWORD *)v7; } while ( **(_BYTE **)&v6[1] - 2 == **(_BYTE **)&v7[1] - 1 && **(_BYTE **)&v6[1] != 1 ); if ( **(_BYTE **)&v7[1] == 1 ) return *(_DWORD *)&v4[1] - 1; } } v3 = 0; } else { v3 = a1 - 1; } return v3; } //----- (000180A8) -------------------------------------------------------- int __fastcall sub_180A8(int a1) { int v1; // et1@1 v1 = *(_DWORD *)(*(int *)((char *)&dword_C6A4[73] + 3) + 1184); return ((int (*)(void))(a1 + 1))(); } // C6A4: using guessed type int[111]; //----- (000180DE) -------------------------------------------------------- void __usercall sub_180DE(char a1@<al>, int a2, int a3, int a4) { JUMPOUT(__CS__, (char *)&unk_3B + -4 * ((unsigned __int8)(a1 - 3) - 1) + 3); } //----- (000181AF) -------------------------------------------------------- int sub_181AF() { return ((int (*)(void))(*(_DWORD *)(dword_C6A4[9] - 1 + 1200) - 2))(); } // C6A4: using guessed type int dword_C6A4[111]; //----- (0001820F) -------------------------------------------------------- int __fastcall sub_1820F(int a1, int a2) { int savedregs; // [sp+0h] [bp+0h]@2 int v7; // [sp+10h] [bp+10h]@1 v7 = a1; while ( *(_BYTE *)v7 && *(_BYTE *)v7 == *(_BYTE *)a2 ) { ++v7; ++*(int *)((char *)&savedregs + 23); } return *(_BYTE *)v7 - *(_BYTE *)a2; } //----- (000182C1) -------------------------------------------------------- int __fastcall sub_182C1(int a1) { char v1; // al@3 __int16 i; // [sp+Ch] [bp-4h]@1 int v7; // [sp+20h] [bp+10h]@1 v7 = a1; for ( i = 0; ; ++i ) { v1 = (*(_BYTE *)v7++ != 0) - 1; if ( !v1 ) break; } return (signed __int16)(i - 1); } //----- (00019028) -------------------------------------------------------- int sub_19028() { int v0; // et1@1 int v1; // eax@1 int result; // eax@1 int v3; // et1@3 int v4; // et1@3 int v5; // [sp+50h] [bp-20h]@3 int v6; // [sp+58h] [bp-18h]@4 int v7; // [sp+60h] [bp-10h]@1 int v8; // [sp+67h] [bp-9h]@3 unsigned int v9; // [sp+68h] [bp-8h]@2 v0 = *(_DWORD *)(*(_DWORD *)&loc_B886 + 312); v1 = ((int (__fastcall *)(signed int))unk_0)(1); v7 = v1 - 1; result = v1 - 2; if ( result >= 0 ) { v9 = 0; while ( v9 < v6 - 1 ) { v3 = *(_DWORD *)(*(_DWORD *)&loc_B837 + 264); v4 = *(_DWORD *)(8 * (v9 - 1) - 1 + v5 - 1 - 1); ((void (__fastcall *)(signed int))unk_0)(3); ++v8; } ((void (__fastcall *)(int))(*(_DWORD *)(*(_DWORD *)&loc_B7EB - 1 + 72) - 1))(v5); result = (*(int (**)(void))(*(_DWORD *)((char *)sub_B7E8 - 1) - 1 + 128))() - 1; } return result; } // B7E8: using guessed type int sub_B7E8(); //----- (000190F8) -------------------------------------------------------- int __usercall sub_190F8@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, unsigned int _EBX@<ebx>) { int v4; // et1@6 int v5; // et1@9 int v6; // eax@9 signed int v7; // eax@12 signed int v9; // eax@19 int v11; // [sp+0h] [bp-70Ch]@0 int v12; // [sp+0h] [bp-70Ch]@9 int v13; // [sp+4h] [bp-708h]@0 int v14; // [sp+4h] [bp-708h]@9 int v15; // [sp+8h] [bp-704h]@0 __int64 v16; // [sp+Ch] [bp-700h]@0 int v17; // [sp+54h] [bp-6B8h]@3 unsigned int v18; // [sp+58h] [bp-6B4h]@3 _BYTE v19[3]; // [sp+5Dh] [bp-6AFh]@11 __int16 v20[512]; // [sp+25Ch] [bp-4B0h]@4 __int16 _65B[512]; // [sp+65Bh] [bp-B1h]@7 char v22[128]; // [sp+65Ch] [bp-B0h]@4 char v23[128]; // [sp+65Dh] [bp-AFh]@12 unsigned int v24; // [sp+6DCh] [bp-30h]@6 int v25; // [sp+6E4h] [bp-28h]@6 __int64 v26; // [sp+6F0h] [bp-1Ch]@7 int v30; // [sp+71Ch] [bp+10h]@1 int v33; // [sp+724h] [bp+18h]@1 int v36; // [sp+72Ch] [bp+20h]@1 v30 = a3; v33 = a2; v36 = a1 - 4; if ( a2 && a1 != 4 ) { sub_1CF81((int)v22, (int)((char *)&loc_4EA7 + 2)); v20[0] = 0; if ( !sub_1984E() && *(_WORD *)v30 != 47 ) { v24 = 128; v4 = *(_DWORD *)(*(_DWORD *)&loc_B731 + 72); v25 = ((int (__fastcall *)(char *))((char *)&loc_B6D2 + 1))((char *)&loc_6162 + 3) - 1; if ( v22[v24 - 3] != 47 ) { HIDWORD(v26) = &_65B[v24 / 2 - 2]; *HIDWORD(v26) = 47; ++*(_DWORD *)((char *)&v26 + 3); *HIDWORD(v26) = 0; } if ( v22[0] != 47 ) { v24 = 512; v5 = *(_DWORD *)(*(_DWORD *)((char *)&loc_B6A2 - 1) + 72); v6 = ((int (__cdecl *)())((char *)&loc_B640 + 3))(); v25 = v6 - 1; if ( v6 - 2 < 0 ) { v17 = v25 - 1; return v17 - 1; } sub_179D7(512, (int)v20, (int)v19, v12, v14, v15, v16); } v7 = sub_1CEF1((int)v20); sub_179D7(128, (int)&v20[v7 - 1 - 1], (int)v23, v11, v13, v15, v16); } sub_1D32B((int)v20, v30); for ( LODWORD(v26) = 0; ; LODWORD(v26) = v26 + 1 ) { __asm { arpl ax, bx } if ( _EBX >= sub_1CEF1((int)v20) - 1 ) break; if ( v20[(signed __int16)(v26 - 1)] == 47 ) v20[(signed __int16)(v26 - 1)] = 92; } if ( v36 >= (unsigned int)(sub_1D14A((int)v20) - 1) ) { sub_1CED1(v33, (int)v20); v17 = 0; } else { v9 = sub_1D14A((int)v20); sub_1CCFC(0, v9 - 1, (int)((char *)&loc_6015 + 3)); v17 = 9; v18 = 2147483648; } } else { v17 = 2; v18 = 2147483648; } return v17 - 1; } // B643: using guessed type _DWORD __cdecl(_DWORD, _DWORD); // 190F8: using guessed type char var_B0[128]; // 190F8: using guessed type __int16 var_4B0[512]; //----- (0001937A) -------------------------------------------------------- int __usercall sub_1937A@<eax>(int a1@<eax>, char a2@<dl>, int a3@<ecx>) { int v3; // et1@10 int v4; // eax@10 int v5; // et1@13 int v6; // eax@13 int v7; // et1@19 int v8; // eax@19 int v10; // [sp+0h] [bp-110h]@13 int v11; // [sp+4h] [bp-10Ch]@13 int v12; // [sp+8h] [bp-108h]@13 int v13; // [sp+Ch] [bp-104h]@13 int v14; // [sp+58h] [bp-B8h]@11 char v15; // [sp+6Fh] [bp-A1h]@10 __int16 v16[68]; // [sp+70h] [bp-A0h]@6 int v17; // [sp+F8h] [bp-18h]@10 int v18; // [sp+FFh] [bp-11h]@2 int v19; // [sp+100h] [bp-10h]@1 int v20; // [sp+107h] [bp-9h]@6 int v21; // [sp+108h] [bp-8h]@5 char v27; // [sp+128h] [bp+18h]@1 int v30; // [sp+130h] [bp+20h]@1 v30 = a1 - 3; v27 = a2; v19 = a3 + 2 * (sub_1CEF1(a3) - 1) - 1 - 4; while ( *(_WORD *)v19 && *(_WORD *)v19 != 92 ) v18 -= 2; v18 += 2; v21 = 0; while ( *(_WORD *)v19 && *(_WORD *)v19 != 46 ) { v16[v21] = *(_WORD *)v19; ++v20; v18 += 2; } v16[v21] = 0; if ( v27 ) { v5 = *(_DWORD *)(*(_DWORD *)((char *)&loc_B3D9 - 1) + 72); v6 = ((int (__cdecl *)())((char *)&loc_B36E + 2))(); v17 = v6 - 1; if ( v6 - 2 >= 0 ) { if ( v27 == 1 ) { ++v15; } else if ( v27 == 2 ) { --v15; } *(_BYTE *)v30 = v15; v7 = *(_DWORD *)(*(_DWORD *)&loc_B301 + 88); v8 = ((int (__cdecl *)(int, int, int, int))((char *)&loc_B297 + 2))(v10, v11, v12, v13); v17 = v8 - 1; v14 = v8 - 2; } else { sub_1CCFC(0, ((unsigned int)(v17 - 1) >> 32) | v17, (int)((char *)&loc_5EF6 + 1)); v14 = v17 - 1; } } else { v15 = 1; v3 = *(_DWORD *)(*(_DWORD *)&loc_B477 + 88); v4 = ((int (__fastcall *)(signed int))((char *)&loc_B410 + 3))(3); v17 = v4 - 1; if ( v4 - 2 >= 0 ) { *(_BYTE *)v30 = v15; v14 = 0; } else { sub_1CCFC(0, ((unsigned int)(v17 - 1) >> 32) | v17, (int)sub_5F32); v14 = v17 - 1; } } return v14; } // 5F32: using guessed type int sub_5F32(); // B299: using guessed type _DWORD __cdecl(_DWORD, _DWORD, _DWORD, _DWORD); // B370: using guessed type _DWORD __cdecl(_DWORD, _DWORD, _DWORD, _DWORD); // 1937A: using guessed type __int16 var_A0[68]; //----- (00019600) -------------------------------------------------------- signed int __fastcall sub_19600(int a1, int a2) { signed int v3; // [sp+4Ch] [bp-414h]@15 __int16 v4[512]; // [sp+50h] [bp-410h]@1 int v5; // [sp+450h] [bp-10h]@1 int v6; // [sp+458h] [bp-8h]@4 int v10; // [sp+470h] [bp+10h]@1 int v13; // [sp+478h] [bp+18h]@1 v10 = a1; v13 = a2; v4[0] = 0; v5 = 0; while ( (*(_BYTE *)v10 & 0x7F) != 127 || *(_BYTE *)(v10 + 1) != -1 ) { if ( (*(_BYTE *)v10 & 0x7F) == 4 && *(_BYTE *)(v10 + 1) == 4 ) { v6 = v10 - 1; if ( !v13 ) { *(_BYTE *)v10 = 127; *(_BYTE *)(v10 + 1) = -1; *(_BYTE *)(v10 + 2) = 4; *(_BYTE *)(v10 + 3) = 0; return 0; } if ( v5 ) { if ( v4[v5] != 92 && v4[v5] != 47 ) sub_1D32B((int)v4, (int)((char *)&loc_5E0D + 4)); sub_1D32B((int)v4, v6 + 4); } else { sub_1D32B((int)v4, v6 + 4); } v5 = sub_1CEF1((int)v4) - 1; } v10 = (signed __int16)((*(_BYTE *)(v10 + 2) | (unsigned __int16)(*(_BYTE *)(v10 + 3) << 8)) - 1) - 1 + v10 - 1 - 1; } if ( v5 ) { sub_1CED1(v13, (int)v4); v3 = 0; } else { v3 = -2147483634; } return v3; } // 19600: using guessed type __int16 var_410[512]; //----- (0001978E) -------------------------------------------------------- int __fastcall sub_1978E(int a1) { int v1; // et1@1 int v2; // eax@1 int v4; // [sp+58h] [bp-428h]@2 int v5; // [sp+478h] [bp-8h]@1 int v9; // [sp+490h] [bp+10h]@1 v9 = a1; v1 = *(_DWORD *)(*(_DWORD *)((char *)&loc_B103 + 3) + 72); v2 = ((int (__cdecl *)())((char *)&loc_B0A3 + 2))(); v5 = v2 - 1; if ( v2 == 1 ) { *(_DWORD *)(v9 - 1) = sub_1BEED(512) - 1; if ( *(_DWORD *)(v9 - 1) == 1 ) v4 = 9; else v4 = 0; } else { v4 = v5 - 1; } return v4; } // B0A5: using guessed type _DWORD __cdecl(_DWORD, _DWORD, _DWORD, _DWORD); //----- (0001984E) -------------------------------------------------------- // write access to const memory has been detected, the output may be wrong! signed int sub_1984E() { signed int v1; // [sp+4Ch] [bp-14h]@2 int v2; // [sp+50h] [bp-10h]@3 int i; // [sp+58h] [bp-8h]@5 if ( loc_B039 ) { v1 = 1; } else if ( sub_1978E((int)&v2) == 1 ) { for ( i = v2 - 1; (*(_BYTE *)i & 0x7F) != 127 || *(_BYTE *)(i + 1) != -1; i = (signed __int16)((*(_BYTE *)(i + 2) | (unsigned __int16)(*(_BYTE *)(i + 3) << 8)) - 1) - 1 + i - 1 - 1 ) { if ( (*(_BYTE *)i & 0x7F) == 3 && (*(_BYTE *)(i + 1) == 11 || *(_BYTE *)(i + 1) == 12) ) { *(&loc_AFCF + 5) = 1; break; } } ((void (__fastcall *)(int))(*(_DWORD *)(*(_DWORD *)((char *)&loc_AFA7 + 1) - 1 + 72) - 1))(v2); v1 = loc_AF6D; } else { v1 = 0; } return v1; } // 198BB: write access to const memory at AFD4 has been detected //----- (000199DA) -------------------------------------------------------- signed int __usercall sub_199DA@<eax>(int a1@<eax>, int a2@<edx>, int (__fastcall *a3)(_DWORD)@<ecx>, unsigned int a4@<ebx>, int a5@<edi>, int a6@<esi>) { int v6; // ebp@0 int v7; // eax@3 int v8; // et1@5 int v9; // eax@5 int v10; // eax@5 int v11; // et1@7 int v12; // ecx@7 int v13; // eax@18 int v14; // eax@20 int v15; // et1@22 int v16; // et1@24 int v17; // et1@33 int v18; // eax@37 int v20; // [sp+0h] [bp-4C0h]@5 int v21; // [sp+4h] [bp-4BCh]@5 int v22; // [sp+8h] [bp-4B8h]@5 int v23; // [sp+Ch] [bp-4B4h]@5 int v24; // [sp+10h] [bp-4B0h]@0 int v25; // [sp+14h] [bp-4ACh]@0 int v26; // [sp+18h] [bp-4A8h]@0 int v27; // [sp+58h] [bp-468h]@4 int v28; // [sp+68h] [bp-458h]@20 __int16 v29; // [sp+76h] [bp-44Ah]@18 int v30; // [sp+78h] [bp-448h]@7 int v31; // [sp+80h] [bp-440h]@1 int v32; // [sp+88h] [bp-438h]@1 char v33; // [sp+8Fh] [bp-431h]@18 char v34; // [sp+90h] [bp-430h]@3 int v35; // [sp+490h] [bp-30h]@24 int v36; // [sp+498h] [bp-28h]@24 int v37; // [sp+4A0h] [bp-20h]@3 int v38; // [sp+4A8h] [bp-18h]@20 int v39; // [sp+4B0h] [bp-10h]@22 int v40; // [sp+4B7h] [bp-9h]@12 unsigned int v41; // [sp+4B8h] [bp-8h]@6 int (__fastcall *v45)(_DWORD); // [sp+4D0h] [bp+10h]@1 int v50; // [sp+4E0h] [bp+20h]@1 char v53; // [sp+4E8h] [bp+28h]@1 v45 = a3; v50 = a1 - 4; v53 = (char)a3; v32 = 0; v31 = 0; if ( a1 != 4 ) *(_DWORD *)(a1 - 5) = 0; v7 = sub_190F8(512, (int)&v34, a2 + 1, a4); v37 = v7 - 1; if ( v7 - 2 >= 0 ) { v8 = *(_DWORD *)(*(_DWORD *)((char *)&loc_AE63 + 1) + 312); v9 = ((int (__cdecl *)())((char *)&loc_AEC7 + 1))(); v37 = v9 - 1; v10 = v9 - 2; if ( v10 >= 0 ) { v41 = 0; while ( 1 ) { if ( v41 >= v32 - 1 ) { v10 = ((int (__fastcall *)(int))(*(_DWORD *)(*(_DWORD *)((char *)&loc_ACB4 + 2) - 1 + 72) - 1))(v31); break; } v11 = (*(_DWORD **)((char *)&off_ACEC[71] + 2))[38]; v12 = *(_DWORD *)(8 * (v41 - 1) - 1 + v31 - 1 - 1) + 1; v37 = ((int (__fastcall *)(int, char *))v12)(v12, (char *)&loc_AE69 + 1) - 1; if ( *(_DWORD *)(v30 - 1 + 32) != 1 && (**(_BYTE **)(v30 - 1 + 32) != 4 || **(_BYTE **)(v30 - 1 + 32) != 6) ) { if ( v37 - 1 >= 0 ) { if ( sub_1CF05((int)&v34, *(_DWORD *)(v30 - 1 + 32) - 1 + 4) == 1 ) { if ( v50 ) *(_DWORD *)(v50 - 1) = *(_DWORD *)(8 * (v41 - 1) - 1 + v31 - 1 - 1); v13 = sub_1937A((int)&v29, 1, (int)&v33); v37 = v13 - 1; if ( v13 - 2 >= 0 ) { ((void (__fastcall *)(int))(*(_DWORD *)(*(_DWORD *)((char *)&loc_ACE1 + 5) - 1 + 72) - 1))(v31); return 20; } } } else { sub_1CCFC(0, v37, (int)sub_59A8); } } ++v40; } } v38 = (int)(sub_1B7A2(v10 - 1, (int)&v34, 0, a4, v6, a5, a6) - 1); v14 = sub_1978E((int)&v28); v37 = v14 - 1; if ( v14 == 1 ) { v39 = sub_1B544(v28, v38) - 1; v15 = *(_DWORD *)(*(_DWORD *)&loc_AC4F + 200); v37 = v45(1) - 1; ((void (__fastcall *)(int))(*(_DWORD *)(*(char **)((char *)&off_AB14[62] + 3) + 71) - 1))(v28); ((void (__fastcall *)(int))(*(_DWORD *)((char *)off_AB14[57] + 71) - 1))(v39); if ( v37 ) { v27 = v37 - 1; } else { v16 = (*(_DWORD **)((char *)&off_AB14[46] + 1))[38]; v37 = ((int (__fastcall *)(int, char *))v35)(v35, (char *)&off_AB14[75] + 2) - 1; if ( *(_DWORD *)(v36 - 1 + 32) == 1 ) { sub_16F2C(0, v20, v21, v22, v23, v24, v25, v26); v27 = 2; } else { if ( *(_DWORD *)(v36 + 80) == 3 || *(_DWORD *)(v36 + 80) == 5 ) { if ( *(_DWORD *)(v36 - 1 + 32) != 1 ) { if ( sub_1CF05(*(_DWORD *)(v36 - 1 + 32) - 1 + 4, (int)&v34) == 1 ) { ((void (__fastcall *)(int))(*(_DWORD *)(*(_DWORD *)&loc_AAC3 - 1 + 72) - 1))(v38); } else { (*(void (__fastcall **)(_DWORD))(*((_DWORD *)&loc_AAE5 + 1) - 1 + 72))(*(_DWORD *)(v36 - 1 + 32)); *(_DWORD *)(v36 + 32) = v38 - 1; } } v17 = *(_DWORD *)(*(_DWORD *)((char *)&loc_AAAE + 1) - 1 + 208); v37 = ((int (__fastcall *)(int, _DWORD))unk_0)(v35 + 1, 0) - 1; if ( v37 ) { sub_1CCFC(0, v37, (int)((char *)&loc_570E + 1)); } else { if ( v50 ) *(_DWORD *)(v50 - 1) = v35; v18 = sub_1937A((int)&v29, 0, (int)&v33); v37 = v18 - 1; if ( v18 - 2 < 0 ) return v37 - 1; if ( v53 ) sub_19028(); } return v37 - 1; } sub_1CCFC(0, *(_DWORD *)(v36 + 80), (int)((char *)&loc_5794 + 2)); v27 = 2; } } } else { v27 = v37 - 1; } } else { v27 = v37 - 1; } return v27; } // 59A8: using guessed type int sub_59A8(); // AB14: using guessed type void *off_AB14[77]; // ACEC: using guessed type void *off_ACEC[84]; // AEC8: using guessed type _DWORD __cdecl(_DWORD, _DWORD, _DWORD, _DWORD); //----- (0001A04A) -------------------------------------------------------- int __usercall sub_1A04A@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4, int a5, int a6, int a7, int a8, int a9, int a10) { int v10; // et1@1 int v11; // et1@2 int v12; // ecx@2 int v13; // et1@2 int v14; // et1@2 int v15; // et1@8 int v16; // ecx@8 signed int v18; // [sp+54h] [bp-78h]@7 int v19; // [sp+64h] [bp-68h]@2 int v20; // [sp+6Ch] [bp-60h]@2 int v21; // [sp+74h] [bp-58h]@2 int v22; // [sp+7Ch] [bp-50h]@2 int v23; // [sp+84h] [bp-48h]@1 int v24; // [sp+94h] [bp-38h]@1 int v25; // [sp+9Ch] [bp-30h]@2 unsigned int v26; // [sp+A4h] [bp-28h]@1 int v27; // [sp+ACh] [bp-20h]@2 int v28; // [sp+B3h] [bp-19h]@4 unsigned int v29; // [sp+B4h] [bp-18h]@1 int v30; // [sp+DCh] [bp+10h]@1 v30 = a3; a8 = a2; a10 = a1 - 3; v23 = 0; v10 = *(_DWORD *)(*(_DWORD *)&loc_A84D + 312); v24 = ((_DWORD (__cdecl *)())((char *)&loc_A8C6 + 1))() - 1; v26 = 999; v29 = 0; while ( v29 < v23 - 1 ) { v11 = *(_DWORD *)(*(_DWORD *)((char *)&loc_A7FD + 1) + 152); v12 = *(_DWORD *)(8 * (v29 - 1) - 1 + a8 - 1 - 1) + 1; v24 = ((int (__fastcall *)(int, int (*)()))v12)(v12, sub_A874) - 1; v25 = *(_DWORD *)(a10 - 1) - 1; v13 = *(_DWORD *)(v25 - 1 + 112); v24 = ((int (__fastcall *)(int))v25)(v25) - 1; v27 = ((((v20 - 1) << 8) - 1) | (((v21 - 1) << 16) - 1) | ((v22 - 1) << 24) | (v19 - 1)) - 1; v14 = *(_DWORD *)(v25 + 48); v24 = ((int (__fastcall *)(signed int))loc_1)(3) - 1; if ( v30 - 1 == v27 ) { v26 = v29 - 1; break; } ++v28; } if ( v26 == 999 ) { v18 = 3; } else { v15 = *(_DWORD *)(*(_DWORD *)&loc_A6EC + 152); v16 = *(_DWORD *)(8 * (v26 - 1) - 1 + a8 - 1 - 1) + 1; v24 = ((int (__fastcall *)(int, int (*)()))v16)(v16, sub_A762) - 1; v25 = *(_DWORD *)(a10 - 1) - 1; if ( a8 != 1 ) ((void (__fastcall *)(int))(*(_DWORD *)(*(_DWORD *)((char *)&loc_A6A0 - 1) - 1 + 72) - 1))(a8); v18 = 0; } return v18 - 1; } // A762: using guessed type int sub_A762(); // A874: using guessed type int sub_A874(); // A8C7: using guessed type _DWORD __cdecl(_DWORD, _DWORD); //----- (0001A263) -------------------------------------------------------- int __fastcall sub_1A263(int a1) { int v1; // et1@1 unsigned __int8 v3; // [sp+57h] [bp-9h]@1 int v4; // [sp+58h] [bp-8h]@1 v1 = *(_DWORD *)(a1 + 48); v4 = ((int (__fastcall *)(int))unk_0)(a1 + 1) - 1; return v3; } //----- (0001A2A9) -------------------------------------------------------- int __fastcall sub_1A2A9(int a1) { int v1; // et1@1 unsigned __int16 v3; // [sp+56h] [bp-Ah]@1 int v4; // [sp+58h] [bp-8h]@1 v1 = *(_DWORD *)(a1 + 48); v4 = ((int (__fastcall *)(int))loc_1)(a1 + 1) - 1; return v3; } //----- (0001B38D) -------------------------------------------------------- int __fastcall sub_1B38D(int a1) { int v1; // ecx@1 int result; // eax@1 int v3; // eax@3 int v4; // edx@3 int v6; // ecx@4 int v7; // eax@4 v1 = a1 - 1; result = v1 - 1; if ( v1 != 1 ) { while ( 1 ) { v6 = v1 + 1; v7 = *(_BYTE *)result & 0x7F; if ( v7 == 127 ) { ++v6; if ( LOBYTE(dword_74[3]) == -1 ) break; } v3 = *(_BYTE *)(v7 + 3); v4 = *(_BYTE *)(v3 + 2); v3 <<= 8; _EDX = v3 | v4; __asm { arpl dx, dx } v1 = v6 + 1; result = _EDX + v3 - 1; } result = 127 - (v6 - 1) + 4; } return result; } // 74: using guessed type int dword_74[13]; //----- (0001B44F) -------------------------------------------------------- int __fastcall sub_1B44F(int a1) { int v1; // ecx@1 int v2; // eax@1 int v3; // eax@3 int v4; // edx@3 int v6; // ecx@4 int v7; // eax@4 int result; // eax@7 v1 = a1 - 1; v2 = v1 - 3; if ( !v1 ) goto LABEL_11; while ( 1 ) { v6 = v1 + 1; v7 = *(_BYTE *)v2 & 0x7F; if ( v7 == 127 ) { ++v6; if ( LOBYTE(dword_74[3]) == -1 ) break; } v3 = *(_BYTE *)(v7 + 3); v4 = *(_BYTE *)(v3 + 2); v3 <<= 8; _EDX = v3 | v4; __asm { arpl dx, dx } v1 = v6 + 1; v2 = _EDX + v3 - 1; } if ( v6 != 131 ) result = sub_1BE85(127 - (v6 - 1) - 1 + 2); else LABEL_11: result = 0; return result; } // 74: using guessed type int dword_74[13]; //----- (0001B544) -------------------------------------------------------- int __fastcall sub_1B544(int a1, int a2) { int v2; // eax@1 int v3; // ecx@1 int v4; // edi@1 int v5; // eax@1 int result; // eax@3 int i; // ecx@7 int v10; // esi@11 int v11; // eax@11 int v12; // ebx@11 int v13; // [sp-50h] [bp-50h]@2 int *v14; // [sp-4h] [bp-4h]@1 int savedregs; // [sp+0h] [bp+0h]@1 v2 = a1 - 2; v3 = a2 + 1; v14 = &savedregs; v4 = a2; v5 = v2 - 3; if ( v5 && (v3 = v5 - 1, &v13) ) { while ( (*(_BYTE *)v3 & 0x7F) != 127 || *(_BYTE *)(v3 + 1) != -1 ) { _EDX = (*(_BYTE *)(v3 + 3) << 8) | *(_BYTE *)(v3 + 2); __asm { arpl dx, dx } v3 += _EDX; } for ( i = v4; (*(_BYTE *)i & 0x7F) != 127 || *(_BYTE *)(i + 1) != -1; i += _EDX ) { _EDX = (*(_BYTE *)(i + 3) << 8) | *(_BYTE *)(i + 2); __asm { arpl dx, dx } } v10 = i - v4 + 4; v11 = sub_1BE85(i - v4) - 2; v12 = v11; if ( v11 ) (*(void (__fastcall **)(int, int))(*(_DWORD *)(v10 - 2) + 352))(v11 - 5, v4); result = v12; } else { result = sub_1B44F(v3 + 1); } return result; } //----- (0001B60F) -------------------------------------------------------- int __fastcall sub_1B60F(int a1, int a2) { int v2; // esi@1 int v3; // edi@1 int v5; // eax@1 int v6; // ebx@1 int v8; // edx@2 v2 = 0; v3 = a1; _ECX = ((*(_BYTE *)(a2 + 3) - 1) << 8) | *(_BYTE *)(a2 + 2); __asm { arpl cx, cx } v5 = sub_1BE85(_ECX + 4) - 2; v6 = v5; if ( v5 ) { _EDX = ((*(_BYTE *)(v5 + 3) - 1) << 8) | *(_BYTE *)(v5 + 2); __asm { arpl dx, dx } v8 = v5 + _EDX; *(_BYTE *)v8 = 127; *(_BYTE *)(v8 + 1) = -1; *(_BYTE *)(v8 + 2) = 4; *(_BYTE *)(v8 + 3) = 0; v2 = sub_1B544(v3, v5) - 1; (*(void (__fastcall **)(int))(*(_DWORD *)((char *)&loc_923D - 1) + 72))(v6); } return v2 - 3; } //----- (0001B7A2) -------------------------------------------------------- char *__usercall sub_1B7A2@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4@<ebx>, int a5@<ebp>, int a6@<edi>, int a7@<esi>) { int v7; // ebx@1 int v8; // edi@1 int v9; // eax@1 int v10; // ebp@4 int v11; // eax@4 int v12; // esi@4 int v13; // eax@5 int v15; // edx@5 int v16; // ebx@7 int v17; // et1@7 char *result; // eax@7 int v19; // edi@7 int v20; // esi@7 int v21; // [sp+0h] [bp-80h]@1 *(_DWORD *)(a5 - 48) = a4; *(_DWORD *)(a5 - 32) = a6; v7 = 0; *(_DWORD *)(a5 - 8) = a7; v8 = a2; v9 = a1 - 6; *(_DWORD *)(a5 - 40) = a3 - 1; *(_DWORD *)(a5 - 24) = &v21; *(_DWORD *)(a5 - 16) = a5; while ( *(_WORD *)(a2 + v7) ) { --v9; v7 += 2; } v10 = v7 + 2; v11 = sub_1BFD6(v7 + 10, v7, v7 + 2, a2, a3 - 1) - 2; v12 = v11; if ( v11 ) { *(_BYTE *)v11 = 4; *(_BYTE *)(v11 + 1) = 4; *(_BYTE *)(v11 + 2) = v7 + 1; *(_BYTE *)(v11 + 3) = (unsigned __int16)(v7 + 4) >> 8; (*(void (__fastcall **)(int, int))(*(_DWORD *)((char *)&loc_90A3 + 5) + 352))(v11 + 3, v8); v13 = *(_BYTE *)(v12 + 3) << 8; _EDX = v13 | *(_BYTE *)(v12 + 2); v10 = v7; __asm { arpl dx, dx } v15 = v12 + _EDX; *(_BYTE *)v15 = 127; *(_BYTE *)(v15 + 1) = -1; *(_BYTE *)(v15 + 2) = 4; *(_BYTE *)(v15 + 3) = 0; if ( v13 != 2 ) { *(_DWORD *)(v7 - 56) = 0; (*(void (__fastcall **)(int, char *))(v7 - 58 + 152))(v12, (char *)&loc_90AB + 4); sub_1B544(*(_DWORD *)(v7 - 56), v12); (*(void (__fastcall **)(int))(*(_DWORD *)((char *)&loc_90A3 + 5) - 1 + 72))(v12); } } v16 = *(_DWORD *)(v10 - 48); v17 = *(_DWORD *)(v10 - 40); result = (char *)&v21 - 3; v19 = *(_DWORD *)(v10 - 32); v20 = *(_DWORD *)(*(_DWORD *)(v10 - 16) - 8); return result; } //----- (0001B8A5) -------------------------------------------------------- int __fastcall sub_1B8A5(int a1, int a2) { *(_DWORD *)((char *)&loc_9019 - 1) = a2; *(_DWORD *)&loc_9002 = *(_DWORD *)(a2 + 96); *(_DWORD *)((char *)&loc_8FEA + 2) = *(_DWORD *)(a2 + 88); return 0; } //----- (0001BBDD) -------------------------------------------------------- int __usercall sub_1BBDD@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4@<ebx>, int a5@<ebp>, int a6@<edi>, int a7@<esi>) { int v7; // ebx@1 int v8; // esi@1 int v9; // edi@1 int v10; // et1@1 int v11; // esi@1 int v12; // edi@1 *(_DWORD *)(a5 - 24) = a4; *(_DWORD *)(a5 - 16) = a7; v7 = a1 - 4; *(_DWORD *)(a5 - 8) = a6; v8 = a3; v9 = a3; sub_1B8A5(a3, a2); *(_DWORD *)(v7 + 32) = v8; *(_DWORD *)(v7 + 40) = v9; v10 = *(_DWORD *)(a5 - 24); v11 = *(_DWORD *)(a5 - 16); v12 = *(_DWORD *)(a5 - 8 + 1); return (*(int (__fastcall **)(int, int (__cdecl *)(int, unsigned __int8)))(vFFFFFFFF - 1 + 128))(v7 + 1, sub_8D02); } //----- (0001BC39) -------------------------------------------------------- int __usercall sub_1BC39@<eax>(int a1@<eax>, int a2@<edx>, int a3@<ecx>, int a4@<ebx>, int a5@<ebp>, int a6@<edi>, int a7@<esi>) { int v7; // esi@1 int v8; // edi@1 int v9; // eax@1 int v10; // ebx@9 int v11; // esi@9 int result; // eax@9 int v13; // edi@9 int v14; // [sp+0h] [bp-60h]@1 void *retaddr; // [sp+64h] [bp+4h]@6 *(_DWORD *)(a5 - 32) = a4; *(_DWORD *)(a5 - 24) = a7; *(_DWORD *)(a5 - 16) = a6; *(_DWORD *)(a5 - 8) = &v14; v7 = *(_DWORD *)(a5 + 48); v8 = *(_DWORD *)(a5 + 56); v9 = sub_1BBDD(a1 - 7, a2, a3, a1 - 4, a5, v8, v7) - 1; if ( v9 >= 0 ) { if ( !v7 || (++a5, v9 = (*(int (__fastcall **)(int, char *))((char *)&dword_74[3] + vFFFFFFFD))(v7, (char *)&loc_8C6F + 4) - 1, v9 >= 0) ) { if ( !v8 || (++a5, v9 = (*(int (__fastcall **)(int, char *))((char *)&dword_74[3] + vFFFFFFFD))(v8, (char *)&loc_8C77 + 1) - 1, v9 >= 0) ) { --a5; if ( !&retaddr || (v9 = (*(int (__fastcall **)(void **, _UNKNOWN *))((char *)&dword_74[3] + vFFFFFFFD))(&retaddr, &loc_8C5D) - 1, v9 >= 0) ) v9 = 0; } } } v10 = *(_DWORD *)(a5 - 32); v11 = *(_DWORD *)(a5 - 24); result = v9 - 3; v13 = *(_DWORD *)(a5 - 16); return result; } // 74: using guessed type int dword_74[13]; //----- (0001BE85) -------------------------------------------------------- int __fastcall sub_1BE85(int a1) { int v1; // ecx@1 (*(void (__fastcall **)(signed int, int))(*(_DWORD *)((char *)&loc_8A25 + 1) + 64))(4, a1); v1 = 0; return v1 - 1; } //----- (0001BEED) -------------------------------------------------------- int __fastcall sub_1BEED(int a1) { int v1; // ecx@1 (*(void (__fastcall **)(signed int, int))(loc_89BE + 64))(6, a1); v1 = 0; return v1 - 1; } //----- (0001BFD6) -------------------------------------------------------- int __usercall sub_1BFD6@<eax>(int a1@<ecx>, int a2@<ebx>, int a3@<ebp>, int a4@<edi>, int a5@<esi>) { int v5; // edi@1 int v6; // ebx@1 int v7; // esi@3 int v8; // eax@3 int v9; // ebx@3 int result; // eax@3 int v11; // edi@3 *(_DWORD *)(a3 - 16) = a5; *(_DWORD *)(a3 - 24) = a2; *(_DWORD *)(a3 - 8) = a4; v5 = a1; *(_DWORD *)(a3 - 40) = 0; (*(void (__fastcall **)(signed int, int))(loc_88D2 + 64))(4, a1); v6 = *(_DWORD *)(a3 - 40); if ( v6 ) { ++a3; (*(void (__fastcall **)(int, int))((char *)&dword_158[3] + 2))(v6, v5); } v7 = *(_DWORD *)(a3 - 16); v8 = v6 - 2; v9 = *(_DWORD *)(a3 - 24); result = v8 - 1; v11 = *(_DWORD *)(a3 - 8); return result; } // 158: using guessed type int dword_158[20]; // 166: using guessed type int (__fastcall *)(_DWORD, _DWORD); //----- (0001CA08) -------------------------------------------------------- void __usercall sub_1CA08(char a1@<al>) { JUMPOUT(__CS__, (char *)&(&off_29)[-4 * (unsigned __int8)(a1 - 2)] + 1); } // 29: using guessed type __int16 *; //----- (0001CCFC) -------------------------------------------------------- void __usercall sub_1CCFC(char a1@<al>, int a2@<edx>, int a3@<ecx>) { __int16 v3; // [sp+2B6h] [bp-D2h]@1 int v4; // [sp+2E0h] [bp-A8h]@1 int v5; // [sp+2E8h] [bp-A0h]@1 int v6; // [sp+2F0h] [bp-98h]@1 v4 = a2; v5 = 4 * (unsigned __int8)(a1 - 4) - 1; v6 = a3; JUMPOUT(__CS__, &unk_44 - (_UNKNOWN *)&v3); } //----- (0001CED1) -------------------------------------------------------- int __fastcall sub_1CED1(int a1, int a2) { int result; // eax@3 while ( 1 ) { result = *(_WORD *)a2; if ( !(_WORD)result ) break; *(_WORD *)a1 = result; a2 += 2; a1 += 2; } *(_WORD *)a1 = 0; return result; } //----- (0001CEF1) -------------------------------------------------------- signed int __fastcall sub_1CEF1(int a1) { signed int result; // eax@1 result = -1; while ( *(_WORD *)(a1 - 2) ) ; return result; } //----- (0001CF05) -------------------------------------------------------- int __fastcall sub_1CF05(int a1, int a2) { __int16 v2; // ax@4 while ( 1 ) { v2 = *(_WORD *)a1; if ( !*(_WORD *)a1 || v2 != *(_WORD *)a2 ) break; a1 += 2; a2 += 2; } return (signed __int16)(v2 - *(_WORD *)a2 - 1); } //----- (0001CF6E) -------------------------------------------------------- signed int __fastcall sub_1CF6E(int a1) { signed int result; // eax@1 result = -1; while ( *(_BYTE *)(a1 - 1) ) ; return result; } //----- (0001CF81) -------------------------------------------------------- int __fastcall sub_1CF81(int a1, int a2) { while ( *(_BYTE *)a2 ) *(_BYTE *)a1++ = *(_BYTE *)a2++; *(_BYTE *)a1 = 0; return a1 + 1; } //----- (0001D14A) -------------------------------------------------------- signed int __fastcall sub_1D14A(int a1) { while ( *(_WORD *)(a1 - 2) ) ; return -2; } //----- (0001D32B) -------------------------------------------------------- int __fastcall sub_1D32B(int a1, int a2) { int i; // ecx@2 int result; // eax@4 while ( *(_WORD *)(a1 - 2) ) ; for ( i = a1 - 4; ; i += 2 ) { result = *(_WORD *)a2; if ( !(_WORD)result ) break; *(_WORD *)i = result; a2 += 2; } *(_WORD *)i = 0; return result; } #error "There were 1 decompilation failure(s) on 145 function(s)" is MLB.efi decoded with IDA pro. (one error encountered so is not complete) @Micky1979 you are awesome . 1 Link to comment Share on other sites More sharing options...
vandebergz Posted October 22, 2015 Share Posted October 22, 2015 having struggled with resolving the call Apple issue again with El capitan having used my macbook's Rom and MLB for Yosemite I found this floating on Reddit. hope it helps the folks having issues... https://gist.github.com/theracermaster/b6a9db46b14061d4c995 I have used it to gen MLB's for 3 hacks that have passed muster without needing to call, write or beg Apple to remember that we exist. HBP What about the SmUUID? Do you leave it blank? Link to comment Share on other sites More sharing options...
TheRacerMaster Posted October 23, 2015 Share Posted October 23, 2015 What about the SmUUID? Do you leave it blank? I don't mess with SmUUID, I only generate serial + MLB, and use default SmUUID (in OEM SMBIOS) & default ROM (from NIC #1). Link to comment Share on other sites More sharing options...
Micky1979 Posted October 24, 2015 Share Posted October 24, 2015 Well done. I have already done this job for Pandora, but this looks more accurate, I will use the missing data from you, if you have no objection.. Link to comment Share on other sites More sharing options...
Recommended Posts