Function at 0x4a36e8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x7c
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x19]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x56ae52
lea esi, [ebp - 0x2c]
mov dword [esp], esi
call fcn.00509af0
mov dword [esp + 0xc], 1
mov dword [esp + 8], esi
mov eax, dword [ebx]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x78]
mov dword [esp], eax
call fcn.0042d7e0
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x2c]
lea esi, [eax - 0xc]
cmp esi, 0x55a154
jne 0x4a3bf8
lea eax, [ebp - 0x1a]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x56ae57
lea esi, [ebp - 0x30]
mov dword [esp], esi
call fcn.00509af0
mov dword [esp + 0xc], 1
mov dword [esp + 8], esi
mov eax, dword [ebx]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x78]
mov dword [esp], eax
call fcn.0042d7e0
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x30]
lea esi, [eax - 0xc]
mov edx, 0x55a154
cmp edx, esi
jne 0x4a3bc6
lea eax, [ebp - 0x1b]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x56ae5c
lea esi, [ebp - 0x34]
mov dword [esp], esi
call fcn.00509af0
mov dword [esp + 0xc], 1
mov dword [esp + 8], esi
mov eax, dword [ebx]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x78]
mov dword [esp], eax
call fcn.0042d7e0
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x34]
lea esi, [eax - 0xc]
mov ecx, 0x55a154
cmp ecx, esi
jne 0x4a3b62
lea eax, [ebp - 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x56ae61
lea esi, [ebp - 0x38]
mov dword [esp], esi
call fcn.00509af0
mov dword [esp + 0xc], 1
mov dword [esp + 8], esi
mov eax, dword [ebx]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x78]
mov dword [esp], eax
call fcn.0042d7e0
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x38]
lea esi, [eax - 0xc]
mov edx, 0x55a154
cmp edx, esi
jne 0x4a3b30
lea eax, [ebp - 0x1d]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x56ae66
lea esi, [ebp - 0x3c]
mov dword [esp], esi
call fcn.00509af0
mov dword [esp + 0xc], 1
mov dword [esp + 8], esi
mov eax, dword [ebx]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x78]
mov dword [esp], eax
call fcn.0042d7e0
mov esi, eax
mov eax, dword [ebp - 0x3c]
lea edi, [eax - 0xc]
mov ecx, 0x55a154
cmp ecx, edi
jne 0x4a3b94
cmp dword [ebp - 0x5c], 0xffffffff
je 0x4a39c0
cmp dword [ebp - 0x64], 0xffffffff
je 0x4a39cc
mov eax, dword [ebx]
mov dword [ebp - 0x5c], eax
mov dword [esp + 4], 0x56acbe
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov esi, eax
test eax, eax
je 0x4a3a64
mov dword [esp], eax
call sub.msvcrt.dll_rewind
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], esi
call sub.msvcrt.dll_fseek
mov dword [esp], esi
call sub.msvcrt.dll_ftell
mov edi, eax
mov dword [esp], esi
call sub.msvcrt.dll_rewind
mov ecx, dword [ebp - 0x64]
add ecx, 0x4000
mov dword [ebp - 0x60], ecx
cmp ecx, edi
jae 0x4a39fc
sub edi, dword [ebp - 0x64]
sub edi, 0x4000
mov dword [esp], edi
call fcn.00538984
mov dword [ebp - 0x5c], eax
mov dword [esp + 8], 0
mov ecx, dword [ebp - 0x60]
mov dword [esp + 4], ecx
mov dword [esp], esi
call sub.msvcrt.dll_fseek
mov dword [esp + 0xc], esi
mov dword [esp + 8], edi
mov dword [esp + 4], 1
mov eax, dword [ebp - 0x5c]
mov dword [esp], eax
call sub.msvcrt.dll_fread
lea eax, [ebp - 0x1f]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x56ae5c
lea edx, [ebp - 0x44]
mov dword [esp], edx
call fcn.00509af0
mov dword [esp + 0xc], edi
lea ecx, [ebp - 0x44]
mov dword [esp + 8], ecx
mov eax, dword [ebp - 0x5c]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x78]
mov dword [esp], eax
call fcn.0042d71c
mov edi, eax
mov eax, dword [ebp - 0x44]
lea edx, [eax - 0xc]
mov dword [ebp - 0x60], edx
mov ecx, 0x55a154
cmp ecx, edx
jne 0x4a3c26
cmp edi, 0xffffffff
je 0x4a3adc
mov edx, dword [ebp - 0x64]
lea edi, [edi + edx + 0x3f80]
mov eax, edi
sub eax, edx
mov dword [ebx + 0x6c], eax
mov edx, dword [ebp - 0x5c]
test edx, edx
je 0x4a39ad
mov ecx, dword [ebp - 0x5c]
mov dword [esp], ecx
call fcn.00538958
mov dword [esp], esi
call sub.msvcrt.dll_fclose
mov al, 1
cmp dword [ebp - 0x68], 0xffffffff
jne 0x4a39eb
lea esi, [esi]
xor eax, eax
add esp, 0x7c
pop ebx
pop esi
pop edi
leave
ret
mov edi, dword [ebp - 0x5c]
add edi, 0xffffff80
cmp dword [ebp - 0x60], 0xffffffff
je 0x4a3a54
mov eax, edi
sub eax, dword [ebp - 0x60]
sub eax, 0xffffff80
mov dword [ebx + 0x6c], eax
mov al, 1
cmp dword [ebp - 0x68], 0xffffffff
je 0x4a39c0
mov ecx, dword [ebp - 0x68]
sub ecx, edi
mov dword [ebx + 0x70], ecx
add esp, 0x7c
pop ebx
pop esi
pop edi
leave
ret
lea eax, [ebp - 0x1e]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Warning_File_size_mismatch
lea edi, [ebp - 0x40]
mov dword [esp], edi
call fcn.00509af0
mov dword [esp + 8], edi
mov dword [esp + 4], 8
mov eax, dword [ebx + 0x78]
mov dword [esp], eax
call fcn.0042ddbc
mov eax, dword [ebp - 0x40]
lea ebx, [eax - 0xc]
mov edx, 0x55a154
cmp edx, ebx
jne 0x4a3c76
mov dword [esp], esi
call sub.msvcrt.dll_fclose
xor eax, eax
add esp, 0x7c
pop ebx
pop esi
pop edi
leave
ret
cmp esi, 0xffffffff
je 0x4a3ad4
mov edx, edi
sub edx, esi
mov dword [ebx + 0x6c], edx
mov al, 1
jmp 0x4a39e5
lea eax, [ebp - 0x26]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x56ae6b
lea esi, [ebp - 0x4c]
mov dword [esp], esi
call fcn.00509af0
xor eax, eax
mov ecx, 0xffffffff
mov edi, dword [ebp - 0x5c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 8], ecx
mov edx, dword [ebp - 0x5c]
mov dword [esp + 4], edx
mov dword [esp], esi
call fcn.00508920
mov dword [esp], 8
call fcn.00538b64
mov ebx, eax
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.005167d8
mov dword [esp + 8], 0x516950
mov dword [esp + 4], 0x572394
mov dword [esp], ebx
call fcn.00539374
nop
xor eax, eax
jmp 0x4a39e5
lea eax, [ebp - 0x20]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Warning_unable_to_determine_start_of_Chaabi_Firmware__CH00_
lea edi, [ebp - 0x48]
mov dword [esp], edi
call fcn.00509af0
mov dword [esp + 8], edi
mov dword [esp + 4], 8
mov eax, dword [ebx + 0x78]
mov dword [esp], eax
call fcn.0042ddbc
mov dword [esp], edi
call fcn.0050a12c
mov ecx, dword [ebp - 0x5c]
test ecx, ecx
je 0x4a3a40
mov eax, dword [ebp - 0x5c]
mov dword [esp], eax
call fcn.00538958
jmp 0x4a3a40
cmp dword [0x554500], 0
jne 0x4a3ca8
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x4a3827
lea eax, [ebp - 0x24]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x4a3827
cmp dword [0x554500], 0
jne 0x4a3cc0
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x4a37da
lea eax, [ebp - 0x23]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x4a37da
cmp dword [0x554500], 0
jne 0x4a3cd8
mov eax, dword [edi + 8]
lea edx, [eax - 1]
mov dword [edi + 8], edx
test eax, eax
jg 0x4a3873
lea eax, [ebp - 0x25]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.005084ec
jmp 0x4a3873
cmp dword [0x554500], 0
jne 0x4a3cf0
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x4a378d
lea eax, [ebp - 0x22]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x4a378d
cmp dword [0x554500], 0
jne 0x4a3c61
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x4a3740
lea eax, [ebp - 0x21]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.005084ec
jmp 0x4a3740
cmp dword [0x554500], 0
jne 0x4a3d1e
mov edx, dword [ebp - 0x60]
mov eax, dword [edx + 8]
lea edx, [eax - 1]
mov ecx, dword [ebp - 0x60]
mov dword [ecx + 8], edx
test eax, eax
jg 0x4a3981
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x60]
mov dword [esp], eax
call fcn.005084ec
jmp 0x4a3981
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a3c0a
cmp dword [0x554500], 0
jne 0x4a3e08
mov eax, dword [ebx + 8]
lea edx, [eax - 1]
mov dword [ebx + 8], edx
test eax, eax
jg 0x4a3a40
lea eax, [ebp - 0x27]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.005084ec
jmp 0x4a3a40
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a3b46
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a3b78
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a3baa
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a3bdc
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a3c42
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.004dd8dc
jmp 0x4a3c8c