Function at 0x408630
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
push eax
mov eax, 0x10a8
call fcn.0041831c
mov ecx, 0x400
sub esp, eax
mov esi, edx
xor edx, edx
mov eax, dword [esp + eax]
lea ebp, [esp + 0xa0]
mov edi, ebp
mov ebx, eax
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, 0x1000
call sym._GC_malloc_kind_aligned_global.constprop.24
lea edi, [eax + 4]
mov ecx, eax
mov dword [eax], 0
mov edx, eax
mov dword [eax + 0xffc], 0
and edi, 0xfffffffc
xor eax, eax
sub ecx, edi
add ecx, 0x1000
shr ecx, 2
rep stosd dword es:[edi], eax
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0x1000
mov dword [esp + 0x40], 1
mov dword [esp + 0x44], 1
lea esi, [esi]
nop
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x1000
mov dword [esp + 4], 1
mov dword [esp], ebp
call sub.msvcrt.dll_fread
test eax, eax
jle 0x4086f0
mov ecx, eax
mov edx, ebp
lea eax, [esp + 0x30]
call sym._array_push_many.part.81
jmp 0x4086c0
mov dword [esp], esi
call sub.msvcrt.dll_feof
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x4087a0
mov dword [esp], esi
call sub.msvcrt.dll_ferror
test eax, eax
je 0x4086c0
mov edx, 1
mov eax, 0x10
mov dword [esp + 0x20], str.file_read_error
mov dword [esp + 0x24], 0xf
mov dword [esp + 0x28], 1
mov dword [esp + 0x2c], 0
call sym._GC_malloc_kind_aligned_global.constprop.24
mov edx, eax
test eax, eax
je 0x408811
mov eax, dword [esp + 0x20]
mov edi, ebx
mov ecx, 0xb
mov dword [edx], eax
mov eax, dword [esp + 0x24]
mov dword [edx + 4], eax
mov eax, dword [esp + 0x28]
mov dword [edx + 8], eax
mov eax, dword [esp + 0x2c]
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x1c]
rep stosd dword es:[edi], eax
mov dword [ebx + 4], edx
mov eax, ebx
mov dword [ebx + 0xc], edx
add edx, 0xc
mov byte [ebx], 1
mov dword [ebx + 8], 3
mov dword [ebx + 0x10], edx
add esp, 0x10ac
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, 1
mov eax, 1
call sym._GC_malloc_kind_aligned_global.constprop.24
mov byte [esp + 0x60], 0
mov eax, dword [esp + 0x60]
mov dword [ebx], eax
mov eax, dword [0x44724c]
mov dword [ebx + 4], eax
mov eax, dword [0x447250]
mov dword [ebx + 8], eax
mov eax, dword [0x447254]
mov dword [ebx + 0xc], eax
mov eax, dword [0x447258]
mov dword [ebx + 0x10], eax
mov eax, dword [esp + 0x30]
mov dword [ebx + 0x14], eax
mov eax, dword [esp + 0x34]
mov dword [ebx + 0x18], eax
mov eax, dword [esp + 0x38]
mov dword [ebx + 0x1c], eax
mov eax, dword [esp + 0x3c]
mov dword [ebx + 0x20], eax
mov eax, dword [esp + 0x40]
mov dword [ebx + 0x24], eax
mov eax, dword [esp + 0x44]
mov dword [ebx + 0x28], eax
add esp, 0x10ac
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
lea edi, [esp + 0x78]
mov ecx, 0xa
lea edx, [esp + 0x60]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x48]
mov dword [esp + 0x60], str.malloc_
mov dword [esp + 0x64], 7
mov dword [esp + 0x68], 1
mov dword [esp + 0x6c], 0xfe09
mov dword [esp + 0x70], 0x10
mov dword [esp + 0x74], 0
mov dword [esp + 0x80], str.__failed
mov dword [esp + 0x84], 8
mov dword [esp + 0x88], 1
call sym._str_intp.constprop.9
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x50]
call sym.__v_panic
lea esi, [esi]
nop