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

Disassembly:
sub esp, 0x268
mov eax, dword [0x477b14]
push esi
mov dword [esp + 0x268], eax
mov eax, dword [esp + 0x274]
push edi
xor edi, edi
cmp eax, 0xffffffff
jne 0x4370a9
mov dword [esp + 0x278], edi
mov eax, dword [esp + 0x274]
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocString
push eax
mov dword [esp + 0x64], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x3c], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4370f5
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x264]
call fcn.00444c27
add esp, 0x268
ret
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
lea ecx, [esp + 0x14]
push ecx
push 2
lea edx, [esp + 0x20]
push edx
push esi
call ebx
cmp word [esp + 0x14], 0x5a4d
je 0x437134
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x264]
call fcn.00444c27
add esp, 0x268
ret
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
push edi
push 0x3c
push esi
call ebp
push edi
lea eax, [esp + 0x18]
push eax
push 2
lea ecx, [esp + 0x2c]
push ecx
push esi
call ebx
mov ax, word [esp + 0x20]
cmp ax, 0x3c
jae 0x43717d
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x264]
call fcn.00444c27
add esp, 0x268
ret
push edi
movzx edx, ax
push edi
push edx
push esi
call ebp
push edi
lea eax, [esp + 0x18]
push eax
push 2
lea ecx, [esp + 0x24]
push ecx
push esi
call ebx
cmp word [esp + 0x18], 0x454e
jne 0x43715d
push 1
push edi
push 0x22
push esi
call ebp
push edi
lea edx, [esp + 0x18]
push edx
push 2
lea eax, [esp + 0x24]
push eax
push esi
call ebx
mov ax, word [esp + 0x18]
cmp ax, di
je 0x43715d
movzx edi, word [esp + 0x20]
push 0
lea edx, [esp + 0x18]
push edx
movzx ecx, ax
push 2
lea eax, [esp + 0x24]
push eax
push esi
add edi, ecx
call ebx
cmp word [esp + 0x18], 0
je 0x43715d
push 0
push 0
push edi
push esi
call ebp
push 0
lea ecx, [esp + 0x18]
push ecx
push 2
lea edx, [esp + 0x44]
push edx
push esi
call ebx
push 0
lea eax, [esp + 0x18]
push eax
push 2
lea ecx, [esp + 0x28]
push ecx
push esi
call ebx
cmp word [esp + 0x1c], 0
jbe 0x4372dc
mov edi, edi
push 1
push 0
push 0xfffffffffffffffe
push esi
call ebp
push 0
lea edx, [esp + 0x18]
push edx
push 8
lea eax, [esp + 0x68]
push eax
push esi
call ebx
mov ax, word [esp + 0x5c]
test ax, ax
je 0x4372bf
cmp al, 3
jne 0x437278
movzx edi, word [esp + 0x5e]
lea ecx, [edi + edi*2]
shl ecx, 2
push ecx
mov dword [esp + 0x54], edi
call fcn.00445884
add esp, 4
push 0
lea edx, [esp + 0x18]
push edx
lea ecx, [edi + edi*2]
shl ecx, 2
push ecx
push eax
push esi
mov dword [esp + 0x50], eax
call ebx
jmp 0x4372bf
cmp al, 0xe
jne 0x4372ac
movzx edi, word [esp + 0x5e]
add dword [esp + 0x28], edi
lea edx, [edi + edi*2]
shl edx, 2
push edx
call fcn.00445884
add esp, 4
push 0
lea ecx, [esp + 0x18]
push ecx
lea edx, [edi + edi*2]
shl edx, 2
push edx
push eax
push esi
mov dword [esp + 0x48], eax
call ebx
jmp 0x4372bf
movzx eax, word [esp + 0x5e]
push 1
lea eax, [eax + eax*2]
push 0
shl eax, 2
push eax
push esi
call ebp
push 0
lea ecx, [esp + 0x18]
push ecx
push 2
lea edx, [esp + 0x28]
push edx
push esi
call ebx
cmp word [esp + 0x1c], 0
ja 0x437220
cmp dword [esp + 0x280], 0xffffffff
jne 0x4372fa
mov eax, dword [esp + 0x28]
imul eax, eax, 0x438
push eax
call fcn.00445884
mov edi, eax
jmp 0x43730a
push 0x438
call fcn.00445884
mov dword [esp + 0x28], eax
mov edi, eax
add esp, 4
push 0
lea ecx, [esp + 0x18]
push ecx
push 1
lea edx, [esp + 0x1f]
push edx
push esi
call ebx
mov al, byte [esp + 0x13]
test al, al
jbe 0x437361
push 0
movzx edx, al
lea ecx, [esp + 0x18]
push ecx
push edx
lea eax, [esp + 0x78]
push eax
push esi
call ebx
movzx ecx, byte [esp + 0x13]
push 0
lea edx, [esp + 0x18]
push edx
push 1
lea eax, [esp + 0x1f]
push eax
push esi
mov word [esp + ecx*2 + 0x80], 0
call ebx
mov al, byte [esp + 0x13]
test al, al
ja 0x437326
mov ecx, dword [esp + 0x28]
xor eax, eax
cmp ecx, eax
mov dword [esp + 0x58], eax
jle 0x437590
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x40], eax
mov dword [esp + 0x48], ecx
jmp 0x437390
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x437390
mov eax, dword [esp + 0x280]
cmp eax, 0xffffffff
jne 0x4373a5
mov edx, dword [esp + 0x48]
movzx eax, word [edx]
jmp 0x4373b0
mov ecx, dword [esp + 0x34]
lea eax, [eax + eax*2]
movzx eax, word [ecx + eax*4]
mov cl, byte [esp + 0x38]
push 0
shl eax, cl
push 0
push eax
push esi
call ebp
push 0
lea edx, [esp + 0x18]
push edx
push 6
lea eax, [esp + 0x38]
push eax
push esi
call ebx
cmp word [esp + 0x2c], 0
jne 0x43715d
mov ax, word [esp + 0x30]
test ax, ax
je 0x43715d
mov ecx, dword [esp + 0x2e]
cmp cx, 1
je 0x4373fd
cmp cx, 2
jne 0x43715d
mov edx, dword [esp + 0x40]
movzx ecx, ax
mov dword [edx + edi + 0x414], ecx
mov eax, dword [edi + 0x414]
dec eax
shl eax, 5
add eax, 0x438
push eax
push edi
call fcn.00445106
movzx ecx, word [esp + 0x38]
imul ecx, ecx, 0xe
mov ebp, eax
push ecx
mov dword [esp + 0x30], ebp
call fcn.00445884
mov edi, eax
movzx eax, word [esp + 0x3c]
imul eax, eax, 0xe
add esp, 0xc
push 0
lea edx, [esp + 0x18]
push edx
push eax
push edi
push esi
mov dword [esp + 0x7c], edi
call ebx
cmp word [esp + 0x30], 0
mov dword [esp + 0x54], 0
jbe 0x437543
mov ecx, dword [esp + 0x40]
add edi, 0xc
mov dword [esp + 0x4c], edi
lea edi, [ecx + ebp + 0x428]
mov ecx, dword [esp + 0x50]
xor eax, eax
cmp ecx, eax
mov dword [esp + 0x44], eax
jle 0x4374c9
mov edx, dword [esp + 0x4c]
mov cx, word [edx]
mov word [esp + 0x64], cx
mov ecx, dword [esp + 0x3c]
add ecx, 6
lea esp, [esp]
mov dx, word [ecx]
xor dx, 0x8000
cmp dx, word [esp + 0x64]
je 0x4374c5
mov edx, dword [esp + 0x44]
mov ebp, dword [esp + 0x50]
inc edx
add ecx, 0xc
cmp edx, ebp
mov dword [esp + 0x44], edx
jl 0x4374a0
jmp 0x4374c9
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x3c]
lea eax, [eax + eax*2]
movzx edx, word [ecx + eax*4]
lea ebp, [ecx + eax*4]
mov cl, byte [esp + 0x38]
push 0
shl edx, cl
push 0
push edx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
movzx eax, word [ebp + 2]
mov cl, byte [esp + 0x38]
shl eax, cl
push eax
mov dword [edi], eax
call fcn.00445884
mov edx, dword [edi]
add esp, 4
push 0
lea ecx, [esp + 0x18]
push ecx
push edx
push eax
push esi
mov dword [edi - 4], eax
call ebx
lea eax, [edi - 0x10]
push eax
call fcn.00436e10
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x58]
add ecx, 0xe
mov dword [esp + 0x50], ecx
movzx ecx, word [esp + 0x34]
add esp, 4
inc eax
add edi, 0x20
cmp eax, ecx
mov dword [esp + 0x54], eax
jl 0x437478
mov edi, dword [esp + 0x68]
push edi
call fcn.00445979
mov eax, dword [esp + 0x284]
add esp, 4
cmp eax, 0xffffffff
jne 0x43758c
mov eax, dword [esp + 0x58]
mov edi, dword [esp + 0x48]
mov edx, dword [esp + 0x40]
mov ecx, dword [esp + 0x28]
add edi, 0xc
inc eax
add edx, 0x438
cmp eax, ecx
mov dword [esp + 0x48], edi
mov edi, dword [esp + 0x24]
mov dword [esp + 0x58], eax
mov dword [esp + 0x40], edx
jl 0x437381
jmp 0x437590
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x3c]
push edx
call fcn.00445979
mov eax, dword [esp + 0x38]
push eax
call fcn.00445979
add esp, 8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x274]
pop ebp
pop ebx
mov eax, edi
pop edi
pop esi
call fcn.00444c27
add esp, 0x268
ret