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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x1001f018]
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 0x1000872d
lea eax, [ebp - 0x38]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x10008740
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10014184
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
push ebx
push 0
push ecx
push edx
push 2
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ebx, eax
mov dword [ebp - 0x3c], ebx
test ebx, ebx
jne 0x1000877a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10014184
mov esp, ebp
pop ebp
ret 4
mov eax, dword [ebp - 0x14]
push edi
push eax
push 0
push 0
push 4
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
test edi, edi
je 0x100087a3
mov ecx, 0x5a4d
cmp word [edi], cx
je 0x100087c4
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call edi
push esi
call edi
pop edi
pop ebx
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10014184
mov esp, ebp
pop ebp
ret 4
mov ebx, dword [edi + 0x3c]
add ebx, edi
cmp dword [ebx], 0x4550
je 0x100087fc
push edi
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 edi
pop ebx
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10014184
mov esp, ebp
pop ebp
ret 4
mov eax, 0x14c
cmp word [ebx + 4], ax
jne 0x1000881a
mov edx, dword [ebx + 0x28]
mov eax, dword [ebx + 0x34]
push edx
push eax
push ebx
call dword [sym.imp.dbghelp.dll_ImageRvaToSection]
test eax, eax
jne 0x10008845
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [ebp - 0x3c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call edi
push esi
call edi
pop edi
pop ebx
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10014184
mov esp, ebp
pop ebp
ret 4
mov edx, dword [eax + 0x14]
sub edx, dword [eax + 0xc]
push 0
add edx, dword [ebx + 0x28]
push 0
push edx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x1000888a
push edi
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 edi
pop ebx
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10014184
mov esp, ebp
pop ebp
ret 4
mov edx, dword [ebp - 0x40]
push 0
lea ecx, [ebp - 0x48]
push ecx
push 0x20
push edx
push esi
mov dword [ebp - 0x48], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
test eax, eax
je 0x10008860
mov ecx, dword [ebx + 0x28]
add ecx, dword [ebx + 0x34]
mov edx, dword [ebp - 0x44]
mov dword [edx], ecx
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
mov ecx, dword [ebp - 4]
pop edi
pop ebx
xor ecx, ebp
mov al, 1
pop esi
call fcn.10014184
mov esp, ebp
pop ebp
ret 4