Function at 0x478828
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
mov dword [esp + 4], 0x52fa1b
mov eax, dword [ebx + 8]
mov dword [esp], eax
call sub.msvcrt.dll_fopen
mov dword [ebx + 0x18], eax
test eax, eax
je 0x478a79
mov dword [esp], eax
call sub.msvcrt.dll_rewind
mov dword [esp + 8], 0
mov dword [esp + 4], 8
mov eax, dword [ebx + 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov eax, dword [ebx + 0x18]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 1
lea eax, [ebp - 0x1c]
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._num_OS_Images_:__d
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00421b78
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x4789c2
mov edi, 0x30
xor esi, esi
mov eax, dword [ebx + 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_rewind
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov eax, dword [ebx + 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_fseek
test eax, eax
jne 0x478a0b
mov eax, dword [ebx + 0x18]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 4
lea eax, [ebp - 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._temp_data_:__x
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00421b78
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x4789e1
mov eax, dword [ebp - 0x20]
shl eax, 9
xor edx, edx
add eax, dword [ebx + 0x38]
adc edx, dword [ebx + 0x3c]
mov dword [ebx + 0x38], eax
mov dword [ebx + 0x3c], edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], esi
mov dword [esp + 8], str.OSII:__d_Data_Size:__d
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00421b78
mov eax, dword [ebp - 0x20]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._Temp_Data_is:__x_h
mov dword [esp + 4], 0x10
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00421b78
mov dword [ebp - 0x20], 0
inc esi
add edi, 0x18
cmp dword [ebp - 0x1c], esi
ja 0x4788d8
fild qword [ebx + 0x38]
mov edi, dword [ebx + 0x3c]
test edi, edi
js 0x4789d9
fstp dword [ebx + 0x4c]
mov al, 1
add esp, 0x4c
pop ebx
pop esi
pop edi
leave
ret
fadd dword [0x52fda0]
jmp 0x4789cc
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 0xc
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], 0xc
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
cmp edx, 3
je 0x478af1
cmp edx, 2
je 0x478ab6
mov dword [esp], eax
call fcn.005099c0
mov dword [esp + 0xc], str.InitOsImage
mov dword [esp + 8], 0x52fb91
mov dword [esp + 4], 8
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00421b78
call fcn.00509b8c
xor eax, eax
jmp 0x4789d1
mov dword [esp], 4
call fcn.0050981c
mov dword [eax], 8
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5373fc
mov dword [esp], eax
call fcn.0050a02c
mov dword [ebp - 0x34], eax
call fcn.00509b8c
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sub.libgcc_s_dw2_1.dll__Unwind_Resume
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.InitOsImage
mov dword [esp + 8], 0x52fb7a
mov dword [esp + 4], 8
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00421b78
jmp 0x478a6d
mov dword [esp], eax
call fcn.005099c0
mov esi, dword [eax]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.InitOsImage
mov dword [esp + 8], 0x52fb58
mov dword [esp + 4], 8
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.00421b78
mov dword [esp + 4], esi
mov dword [esp], ebx
call fcn.0047841c
call fcn.00509b8c
test esi, esi
sete al
jmp 0x4789d1