Function at 0x47ade0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [ebp + 8]
xor esi, esi
mov dword [esp], ebx
call fcn.0047a794
test al, al
jne 0x47ae10
mov edi, dword [ebx + 0x64]
test edi, edi
je 0x47b014
mov ecx, dword [ebx + 0x68]
test ecx, ecx
je 0x47afec
mov eax, dword [ebx]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x70]
mov dword [esp], eax
call fcn.00422d58
mov dword [ebx + 0x3c], eax
mov edx, dword [ebx + 0x68]
add edx, dword [ebx + 0x64]
cmp eax, edx
jb 0x47b03b
sub eax, edx
mov dword [ebx + 0x38], eax
mov dword [esp], eax
call fcn.0050963c
mov dword [ebx + 0x1c], eax
test eax, eax
je 0x47b08f
mov eax, dword [ebx + 0x64]
add eax, dword [ebx + 0x68]
add eax, 0x200
mov dword [ebx + 0x5c], eax
mov dword [esp], eax
call fcn.0050963c
mov dword [ebx + 0x2c], eax
test eax, eax
je 0x47b065
mov dword [esp + 4], 0x52fe02
mov eax, dword [ebx]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov esi, eax
test eax, eax
je 0x47afe0
mov dword [esp], eax
call sub.msvcrt.dll_rewind
mov dword [esp + 8], 0
mov eax, dword [ebx + 0x3c]
sub eax, 0x200
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_fseek
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x200
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, 0x200
jne 0x47b137
mov dword [esp], esi
call sub.msvcrt.dll_rewind
mov dword [esp + 0xc], esi
mov eax, dword [ebx + 0x38]
sub eax, 0x200
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x1c]
add eax, 0x200
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov edx, dword [ebx + 0x38]
sub edx, 0x200
cmp eax, edx
jne 0x47b10d
mov dword [esp], esi
call sub.msvcrt.dll_rewind
mov dword [esp + 8], 0
mov eax, dword [ebx + 0x3c]
sub eax, 0x200
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_fseek
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x200
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, 0x200
jne 0x47b0e3
mov dword [esp], esi
call sub.msvcrt.dll_rewind
mov dword [esp + 8], 0
mov eax, dword [ebx + 0x3c]
sub eax, dword [ebx + 0x64]
sub eax, dword [ebx + 0x68]
sub eax, 0x200
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_fseek
mov dword [esp + 0xc], esi
mov eax, dword [ebx + 0x68]
add eax, dword [ebx + 0x64]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebx + 0x2c]
add eax, 0x200
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov edx, dword [ebx + 0x68]
add edx, dword [ebx + 0x64]
cmp eax, edx
jne 0x47b0b9
xor edi, edi
test esi, esi
je 0x47afd0
mov dword [esp], esi
call sub.msvcrt.dll_fclose
test edi, edi
sete al
add esp, 0x3c
pop ebx
pop esi
pop edi
leave
ret
mov al, 1
add esp, 0x3c
pop ebx
pop esi
pop edi
leave
ret
mov dword [esp + 8], str.Unable_to_determine_chaabi_fw_size__setting_to_72KB__
mov dword [esp + 4], 0x800
mov eax, dword [ebx + 0x70]
mov dword [esp], eax
call fcn.00421b78
mov dword [ebx + 0x68], 0x12000
jmp 0x47ae10
mov dword [esp + 8], str.Unable_to_determine_chaabi_token_size__setting_to_12KB__
mov dword [esp + 4], 0x800
mov eax, dword [ebx + 0x70]
mov dword [esp], eax
call fcn.00421b78
mov dword [ebx + 0x64], 0x4000
jmp 0x47ae05
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 5
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 6
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
cmp edx, 3
je 0x47b1a9
cmp edx, 2
je 0x47b203
mov dword [esp], eax
call fcn.005099c0
mov dword [esp + 0xc], str.InitDnx
mov dword [esp + 8], str._s_Unknown_Exception_raised
mov dword [esp + 4], 8
mov eax, dword [ebx + 0x70]
mov dword [esp], eax
call fcn.00421b78
call fcn.00509b8c
mov edi, 1
jmp 0x47afc4
mov dword [esp], eax
call fcn.005099c0
mov edi, dword [eax]
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], str.InitDnx
mov dword [esp + 8], str._s_Exception_raised:_ErrorCode__d
mov dword [esp + 4], 8
mov eax, dword [ebx + 0x70]
mov dword [esp], eax
call fcn.00421b78
mov dword [esp + 4], edi
mov dword [esp], ebx
call fcn.0047a008
call fcn.00509b8c
jmp 0x47afc4
mov dword [esp], eax
call fcn.005099c0
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.InitDnx
mov dword [esp + 8], str._s_Exception_raised__s
mov dword [esp + 4], 8
mov eax, dword [ebx + 0x70]
mov dword [esp], eax
call fcn.00421b78
jmp 0x47b19a