Function at 0x10042f90
Capabilities:
Access peb ldr_data
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100833a8
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push esi
push edi
mov eax, dword [section..data]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov edx, dword [esi + 0x30]
mov eax, 0x5a4d
mov dword [esi + 0xc], edx
cmp word [edx], ax
je 0x10043018
mov eax, dword [esi + 4]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x10042fd9
push eax
call edi
mov eax, dword [esi]
mov dword [esi + 4], 0
test eax, eax
je 0x10042fee
cmp eax, 0xffffffff
je 0x10042fee
push eax
call edi
push dword [esi + 0x30]
mov dword [esi], 0xffffffff
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push str.Incorrect_PE_file__e_magic___IMAGE_DOS_SIGNATURE_
lea ecx, [ebp - 0x14]
call fcn.10043540
push 0x100ac2c0
lea eax, [ebp - 0x14]
push eax
call fcn.10070600
mov eax, dword [edx + 0x3c]
xor edi, edi
lea ecx, [eax + 0xf8]
cmp edi, dword [esi + 0x2c]
jb 0x10043070
ja 0x1004302f
cmp ecx, dword [esi + 0x28]
jb 0x10043070
mov eax, dword [esi + 4]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x1004303f
push eax
call edi
mov eax, dword [esi]
mov dword [esi + 4], 0
test eax, eax
je 0x10043054
cmp eax, 0xffffffff
je 0x10043054
push eax
call edi
cmp dword [esi + 0x34], 0
mov dword [esi], 0xffffffff
je 0x10043069
push dword [esi + 0x30]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push str.Incorrect_PE_file__header___filesize_
jmp 0x10043002
add eax, edx
mov dword [esi + 0x40], eax
cmp dword [eax], 0x4550
je 0x10043107
push str.Incorrect_PE_file__incorrect_signature_
lea ecx, [ebp - 0x10]
call fcn.10022bb0
mov dword [ebp - 4], 0
mov ecx, 0x454e
mov eax, dword [esi + 0x40]
cmp word [eax], cx
jne 0x100430af
push str.NE_executable
lea ecx, [ebp - 0x10]
call fcn.10022c70
mov eax, dword [esi + 4]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x100430bf
push eax
call edi
mov eax, dword [esi]
mov dword [esi + 4], 0
test eax, eax
je 0x100430d4
cmp eax, 0xffffffff
je 0x100430d4
push eax
call edi
cmp dword [esi + 0x34], 0
mov dword [esi], 0xffffffff
je 0x100430e9
push dword [esi + 0x30]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [ebp - 0x10]
lea ecx, [ecx - 0x10]
call fcn.100236e0
add eax, 0x10
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push 0x100ac2c0
jmp 0x10043012
add eax, 0x18
xor ecx, ecx
mov edi, 0x20b
mov dword [esi + 0x14], eax
cmp word [eax], di
sete cl
mov dword [esi + 0x3c], ecx
test ecx, ecx
je 0x1004313f
mov eax, dword [edx + 0x3c]
add eax, edx
mov dword [esi + 0x44], eax
add eax, 0x18
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x44]
mov ax, word [eax + 6]
mov word [esi + 8], ax
mov eax, dword [esi + 0x44]
jmp 0x1004314d
mov eax, dword [esi + 0x40]
mov ax, word [eax + 6]
mov word [esi + 8], ax
mov eax, dword [esi + 0x40]
add eax, 4
mov dword [esi + 0x10], eax
test ecx, ecx
je 0x10043171
mov eax, dword [esi + 0x18]
add eax, 0x70
mov dword [esi + 0x1c], eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x14]
add eax, 0x60
mov dword [esi + 0x1c], eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret