Function at 0x10007db0
Capabilities:
Parse pe header
Read file on windows
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x1001e018]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push 0
push 0
push 3
push 0
push 1
push closesocket
push eax
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x40], edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x10007dfd
lea eax, [ebp - 0x38]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x10007e10
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10012cf4
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
push edi
push 0
push ecx
push edx
push 2
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov edi, eax
mov dword [ebp - 0x3c], edi
test edi, edi
jne 0x10007e4a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10012cf4
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0x14]
push ebx
push eax
push 0
push 0
push 4
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
test ebx, ebx
je 0x10007e73
mov ecx, 0x5a4d
cmp word [ebx], cx
je 0x10007e94
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
push esi
call edi
pop ebx
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10012cf4
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebx + 0x3c]
add edi, ebx
cmp dword [edi], 0x4550
jne 0x10007f11
movzx eax, word [edi + 4]
mov ecx, 0x14c
cmp ax, cx
je 0x10007eb9
mov edx, 0x8664
cmp ax, dx
jne 0x10007ecc
mov ecx, dword [edi + 0x28]
mov edx, dword [edi + 0x34]
push ecx
push edx
push edi
call dword [sym.imp.dbghelp.dll_ImageRvaToSection]
test eax, eax
jne 0x10007ef7
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x3c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
push esi
call edi
pop ebx
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10012cf4
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [eax + 0x14]
sub ecx, dword [eax + 0xc]
push 0
add ecx, dword [edi + 0x28]
push 0
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x10007f3c
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov edx, dword [ebp - 0x3c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call edi
push esi
call edi
pop ebx
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10012cf4
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 0x40]
push 0
lea eax, [ebp - 0x48]
push eax
push 0x20
push ecx
push esi
mov dword [ebp - 0x48], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
test eax, eax
je 0x10007f12
mov eax, dword [edi + 0x28]
add eax, dword [edi + 0x34]
mov ecx, dword [ebp - 0x44]
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov edx, dword [ebp - 0x3c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call edi
push esi
call edi
mov ecx, dword [ebp - 4]
pop ebx
pop edi
xor ecx, ebp
mov al, 1
pop esi
call fcn.10012cf4
mov esp, ebp
pop ebp
ret 4