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

Disassembly:
sub esp, 0x64
push ebp
xor ebp, ebp
mov dword [esp + 8], ebp
call section..text
test eax, eax
jne 0x401902
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
push str.0C21844
push ebp
push 0xf001f
call ebx
mov dword [esp + 0x24], eax
cmp eax, ebp
jne 0x401451
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop ebx
xor eax, eax
pop ebp
add esp, 0x64
ret
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push ebp
push ebp
push ebp
push 2
push eax
call edi
push str.1C21844
push ebp
mov esi, eax
push 0xf001f
mov dword [esi], 0x60010000
call ebx
mov ebx, eax
mov dword [esp + 0x28], ebx
cmp ebx, ebp
jne 0x40148b
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x401880
push ebp
push ebp
push ebp
push 2
push ebx
call edi
mov edi, eax
mov dword [esp + 0x20], edi
cmp edi, ebp
jne 0x4014aa
mov dword [esp + 0x10], 0xc0000040
jmp 0x401875
lea eax, [esp + 0x24]
push eax
call fcn.00401250
add esp, 4
test eax, eax
jne 0x4014c8
mov dword [esp + 0x10], 0xc00000ef
jmp 0x40186e
mov ecx, dword [esi + 0x30]
add ecx, dword [esi + 0x38]
mov eax, dword [esi + 0x34]
adc eax, dword [esi + 0x3c]
cmp eax, dword [esi + 0x2c]
jb 0x4014ed
ja 0x4014e0
cmp ecx, dword [esi + 0x28]
jbe 0x4014ed
mov dword [esp + 0x10], 0xc0000033
jmp 0x40186e
mov ecx, dword [esp + 0x24]
push ecx
lea edx, [esp + 0x4c]
push edx
call dword [0x40302c]
push 0x64
push 1
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x68]
lea eax, [esp + 0x54]
push edx
mov dword [esp + 0x74], eax
push 0x100001
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x74], 0x18
mov dword [esp + 0x78], ebp
mov dword [esp + 0x80], ebp
mov dword [esp + 0x84], ebp
mov dword [esp + 0x88], ebp
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x58], ebp
mov dword [esp + 0x2c], ebp
call dword [0x40300c]
mov dword [esp + 0x10], eax
cmp eax, ebp
jne 0x40186e
mov eax, dword [esp + 0x14]
push ebp
lea ecx, [esp + 0x1c]
push ecx
push 0xc
lea edx, [esp + 0x5c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x18], 0xc
je 0x401588
mov dword [esp + 0x10], 0xc0000011
jmp 0x40185b
cmp dword [esp + 0x50], 0x4d524f46
jne 0x4015c5
mov eax, dword [esp + 0x58]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
cmp eax, 0x43464941
je 0x401682
mov ecx, 0x46464941
cmp eax, ecx
je 0x40167a
cmp eax, 0x4d4d4f43
je 0x4015d2
mov dword [section..data], 0
mov dword [esp + 0x10], 0xc0000024
jmp 0x40185b
push 1
mov dword [section..data], ecx
or ecx, 0xffffffff
push 0
push ecx
mov eax, 0xfffffffc
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x20]
push eax
push ecx
mov dword [esp + 0x44], eax
call ebp
cmp dword [section..data], 0
je 0x40185b
xor eax, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x58], eax
lea esp, [esp]
mov ecx, dword [esp + 0x14]
push 0
lea edx, [esp + 0x1c]
push edx
push 8
lea eax, [esp + 0x5c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x18], 8
jne 0x401725
mov edx, dword [esp + 0x54]
mov edi, dword [esp + 0x50]
push edx
call fcn.00401160
push edi
mov ebx, eax
call fcn.004010f0
add esp, 8
cmp edi, 0x444e5353
je 0x4016b2
cmp edi, 0x4d4d4f43
je 0x401691
test bl, 1
je 0x401663
inc ebx
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x14]
push 1
push 0
push eax
push ebx
push ecx
mov dword [esp + 0x44], ebx
call ebp
jmp 0x401610
mov dword [section..data], ecx
jmp 0x401602
mov dword [section..data], 0x43464941
jmp 0x401602
mov edx, dword [esp + 0x14]
push ebx
push edx
call fcn.004012e0
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
je 0x401610
cmp eax, 0x60000001
jne 0x40171a
mov edx, dword [esp + 0x14]
push 0
lea eax, [esp + 0x1c]
push eax
push 8
lea ecx, [esp + 0x5c]
push ecx
push edx
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x18], 8
jne 0x40157b
mov eax, dword [esp + 0x50]
push eax
call fcn.00401160
mov ecx, dword [esp + 0x58]
push ecx
mov edi, eax
call fcn.00401160
add esp, 8
test eax, eax
jne 0x401702
sub ebx, edi
sub ebx, 8
mov eax, ebx
mov ecx, dword [esi + 0x38]
mov dword [esp + 0x1c], ecx
cmp eax, ecx
je 0x401732
mov dword [esp + 0x10], 0xc0000206
jmp 0x40185b
cmp eax, 0xc0000011
jne 0x40185b
mov dword [esp + 0x10], 0xc000028c
jmp 0x40185b
mov ebx, dword [esi + 0x30]
add ebx, dword [esp + 0x20]
xor eax, eax
mov dword [esi], 0x60010001
mov ecx, edi
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], ecx
test edi, edi
je 0x40175f
mov edx, dword [esp + 0x14]
push 1
push eax
push eax
push ecx
push edx
call ebp
mov eax, dword [esp + 0x34]
push 1
lea edx, [esp + 0x34]
push edx
push eax
mov eax, dword [esp + 0x20]
xor ecx, ecx
push ecx
push eax
mov dword [esp + 0x44], ecx
call ebp
mov eax, dword [esp + 0x30]
xor edi, edi
and eax, 7
je 0x4017b2
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x1c]
push ecx
mov edi, 8
sub edi, eax
push edi
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x18]
cmp eax, edi
jne 0x40157b
add ebx, eax
add dword [esi + 0x40], eax
mov edi, eax
adc dword [esi + 0x44], 0
mov eax, dword [esp + 0x1c]
xor edx, edx
mov ecx, 3
div ecx
mov dword [esp + 0x38], 0xffee7f9d
mov dword [esp + 0x3c], 0xffffffff
shr eax, 3
and eax, 0x1ffffff8
mov ebp, eax
lea edx, [ebp + ebp*2]
lea eax, [edi + edx*4]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
lea ecx, [edi + ebp]
cmp ecx, eax
jbe 0x4017f3
mov ebp, eax
sub ebp, edi
mov eax, dword [esp + 0x14]
push 0
lea edx, [esp + 0x1c]
push edx
push ebp
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x18]
cmp eax, ebp
jne 0x40157b
add edi, eax
add ebx, eax
add dword [esi + 0x40], eax
adc dword [esi + 0x44], 0
cmp edi, dword [esp + 0x24]
jne 0x40184d
lea ecx, [esp + 0x38]
push ecx
push 0
call dword [0x403010]
mov eax, dword [esp + 0x1c]
cmp edi, eax
je 0x40189e
mov dword [esp + 0x38], 0xffdbfa98
mov dword [esp + 0x3c], 0xffffffff
mov dword [esp + 0x24], eax
cmp dword [esi + 8], 1
jne 0x4017e4
mov dword [esp + 0x10], 0x60010002
mov edx, dword [esp + 0x14]
push edx
call dword [0x403014]
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
push esi
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
xor eax, eax
pop ebp
add esp, 0x64
ret
cmp dword [section..data], 0x53464941
je 0x4018f6
mov ebx, dword [esi + 0x30]
add ebx, dword [esp + 0x20]
cmp dword [0x403004], 0x10
jne 0x4018c8
push edi
push ebx
call fcn.00401190
add esp, 8
mov dword [esp + 0x10], eax
cmp dword [0x403004], 0x18
jne 0x4018df
push edi
push ebx
call fcn.004011d0
add esp, 8
mov dword [esp + 0x10], eax
cmp dword [0x403004], 0x20
jne 0x4018f6
push edi
push ebx
call fcn.00401200
add esp, 8
mov dword [esp + 0x10], eax
add dword [esi + 0x30], edi
adc dword [esi + 0x34], 0
jmp 0x40185b
xor eax, eax
pop ebp
add esp, 0x64
ret