Function at 0x40a630
Capabilities:
Get file size
Read file on windows

Disassembly:
movsx eax, byte [esp + 4]
sub esp, 0x204
nop
lea ecx, [eax + eax*2]
nop
push ebx
push esi
push edi
push ebp
mov esi, dword [ecx*8 + 0x458fe4]
lea edi, [ecx*8]
shl esi, 5
mov eax, dword [esi + 0x52f5f0]
test eax, eax
je 0x40a66a
push eax
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalFree]
call ebx
jmp 0x40a670
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [esi + 0x52f5f0], 0
mov dword [esi + 0x52f5f8], 0
mov eax, dword [esi + 0x52f5f4]
test eax, eax
je 0x40a691
push eax
call ebx
mov eax, dword [edi + 0x458fd0]
lea ecx, [esp + 0x14]
mov dword [esi + 0x52f5f4], 0
mov dword [esi + 0x52f5fc], 0
push eax
push str...BIN_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
lea edx, [esp + 0x120]
add esp, 0xc
mov ecx, dword [edi + 0x458fd4]
push ecx
push str...BIN_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea ecx, [esp + 0x14]
push 0
push pe_nt_image_headers32
push 3
push 0
push 1
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov ebx, eax
jne 0x40a747
mov eax, dword [edi + 0x458fd0]
lea ecx, [esp + 0x14]
push eax
push 0x455630
push str._sBIN_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [esp + 0x14]
push 0
push pe_nt_image_headers32
push 3
push 0
push 1
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov ebx, eax
je 0x40a8af
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov ebp, eax
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [esi + 0x52f5f0], eax
test eax, eax
je 0x40a8a8
lea ecx, [esp + 0x10]
push 0
push ecx
push ebp
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40a8a8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x114]
push 0
push pe_nt_image_headers32
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov ebx, eax
jne 0x40a7fc
mov eax, dword [edi + 0x458fd4]
lea ecx, [esp + 0x114]
push eax
push 0x455630
push str._sBIN_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [esp + 0x114]
push 0
push pe_nt_image_headers32
push 3
push 0
push 1
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov ebx, eax
je 0x40a8a8
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov ebp, eax
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [esi + 0x52f5f4], eax
test eax, eax
je 0x40a8a8
lea ecx, [esp + 0x10]
push 0
push ecx
push ebp
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40a8a8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [edi + 0x458fe4]
mov ecx, dword [edi + 0x458fe0]
push eax
mov eax, dword [edi + 0x458fdc]
mov edx, dword [ecx]
mov ecx, dword [edi + 0x458fd8]
push edx
push eax
push ecx
mov edx, dword [esi + 0x52f5f4]
push edx
mov eax, dword [esi + 0x52f5f0]
push eax
call dword [0x52b848]
mov ecx, dword [edi + 0x458fd8]
mov edx, dword [edi + 0x458fdc]
mov eax, dword [edi + 0x458fe0]
mov dword [esi + 0x52f600], ecx
pop ebp
mov dword [esi + 0x52f604], edx
mov ecx, dword [eax]
mov edx, dword [edi + 0x458fe4]
pop edi
mov dword [esi + 0x52f608], ecx
mov dword [esi + 0x52f60c], edx
pop esi
pop ebx
add esp, 0x204
ret
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x204
ret