Function at 0x40826e
Capabilities:
Get file size
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0xc], edi
mov ebx, edi
test edx, edx
je 0x4083ac
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_Wow64DisableWow64FsRedirection]
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
push str.C:WindowsSystem32_ntdll.dll
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push edi
push eax
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov dword [ebp - 8], edi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push ebx
mov edi, eax
lea eax, [ebp - 8]
push eax
push esi
push edi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_Wow64RevertWow64FsRedirection]
mov eax, dword [edi + 0x3c]
add eax, edi
mov edx, eax
mov dword [ebp - 0x1c], eax
mov ecx, dword [eax + 0x88]
call fcn.00408239
and dword [ebp - 0x14], ebx
mov esi, dword [eax + 0xc]
mov edx, dword [eax + 0x14]
mov eax, edx
sub eax, esi
mov dword [ebp - 0x10], edx
add eax, ecx
mov dword [ebp - 0x24], esi
add eax, edi
mov ecx, dword [eax + 0x20]
sub ecx, esi
add ecx, edx
add ecx, edi
mov dword [ebp - 0x20], ecx
mov ecx, dword [eax + 0x1c]
sub ecx, esi
add ecx, edx
mov edx, dword [eax + 0x24]
mov eax, dword [eax + 0x18]
sub edx, esi
add edx, dword [ebp - 0x10]
add ecx, edi
add edx, edi
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x30], eax
test eax, eax
je 0x4084a7
xor esi, esi
movzx eax, word [edx + esi*2]
mov edx, dword [ebp - 0x1c]
mov eax, dword [ecx + eax*4]
mov ecx, eax
mov dword [ebp - 0x2c], eax
call fcn.00408239
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + esi*4]
sub ecx, dword [ebp - 0x24]
add ecx, dword [ebp - 0x10]
add ecx, edi
call fcn.00408c7f
cmp eax, dword [ebp - 0x3c]
jne 0x408392
mov ecx, dword [ebp - 0x28]
mov eax, dword [ecx + 0x14]
sub eax, dword [ecx + 0xc]
add eax, dword [ebp - 0x2c]
mov ebx, dword [eax + edi + 4]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x34]
inc eax
mov edx, dword [ebp - 0x38]
movzx esi, ax
mov dword [ebp - 0x14], eax
cmp esi, dword [ebp - 0x30]
jb 0x408353
jmp 0x4084a7
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
push str.C:WindowsSystem32_ntdll.dll
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push edi
push eax
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
mov dword [ebp - 8], edi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0
mov edi, eax
lea eax, [ebp - 8]
push eax
push esi
push edi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [edi + 0x3c]
add eax, edi
mov edx, eax
mov dword [ebp - 0x38], eax
mov ecx, dword [eax + 0x78]
call fcn.00408239
and dword [ebp - 0x10], ebx
mov esi, dword [eax + 0xc]
mov edx, dword [eax + 0x14]
mov eax, edx
sub eax, esi
mov dword [ebp - 0x14], edx
add eax, ecx
mov dword [ebp - 0x30], esi
add eax, edi
mov ecx, dword [eax + 0x20]
sub ecx, esi
add ecx, edx
add ecx, edi
mov dword [ebp - 0x34], ecx
mov ecx, dword [eax + 0x1c]
sub ecx, esi
add ecx, edx
mov edx, dword [eax + 0x24]
mov eax, dword [eax + 0x18]
sub edx, esi
add edx, dword [ebp - 0x14]
add ecx, edi
add edx, edi
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x24], eax
test eax, eax
je 0x4084a7
xor esi, esi
movzx eax, word [edx + esi*2]
mov edx, dword [ebp - 0x38]
mov eax, dword [ecx + eax*4]
mov ecx, eax
mov dword [ebp - 0x28], eax
call fcn.00408239
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x34]
mov ecx, dword [eax + esi*4]
sub ecx, dword [ebp - 0x30]
add ecx, dword [ebp - 0x14]
add ecx, edi
call fcn.00408c7f
cmp eax, dword [ebp - 0x3c]
jne 0x408492
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ecx + 0x14]
sub eax, dword [ecx + 0xc]
add eax, dword [ebp - 0x28]
mov ebx, dword [eax + edi + 1]
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
inc eax
mov edx, dword [ebp - 0x1c]
movzx esi, ax
mov dword [ebp - 0x10], eax
cmp esi, dword [ebp - 0x24]
jb 0x408453
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00408d2b
leave
ret