Function at 0x10013ef0
Capabilities:
Parse pe header
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, ecx
mov ecx, 0x5a4d
push ebx
push esi
mov dword [ebp - 8], eax
cmp word [eax], cx
jne 0x10014371
mov ebx, dword [eax + 0x3c]
add ebx, eax
cmp dword [ebx], 0x4550
jne 0x10014371
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x2000
push dword [ebx + 0x50]
push dword [ebx + 0x34]
call esi
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x10013f50
push 4
push 0x2000
push dword [ebx + 0x50]
push eax
call esi
mov dword [ebp - 0xc], eax
test eax, eax
je 0x10014371
push edi
push 0x14
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov eax, dword [ebp - 0xc]
push 4
push 0x1000
mov dword [ebp - 4], edi
mov dword [edi + 4], eax
mov dword [edi + 0xc], 0
mov dword [edi + 8], 0
mov dword [edi + 0x10], 0
push dword [ebx + 0x50]
push eax
call esi
push 4
push 0x1000
push dword [ebx + 0x54]
push dword [ebp - 0xc]
call esi
mov ecx, dword [ebx + 0x54]
mov esi, eax
mov eax, dword [ebp - 8]
add ecx, dword [eax + 0x3c]
push ecx
push eax
push esi
call fcn.10021a40
mov ecx, dword [ebp - 8]
add esp, 0xc
mov dword [ebp - 0x14], 0
mov eax, dword [ecx + 0x3c]
mov ecx, dword [ebp - 0xc]
add eax, esi
mov dword [edi], eax
mov dword [eax + 0x34], ecx
xor eax, eax
mov ecx, dword [edi]
mov edx, dword [edi + 4]
mov dword [ebp - 0x10], edx
movzx edi, word [ecx + 0x14]
add edi, 0x28
cmp ax, word [ecx + 6]
jae 0x10014069
mov edx, dword [ebp - 4]
add edi, ecx
nop dword [eax + eax]
mov eax, dword [edi]
test eax, eax
jne 0x10014020
mov esi, dword [ebx + 0x38]
test esi, esi
jle 0x1001404f
mov eax, dword [edi - 4]
add eax, dword [ebp - 0x10]
push 4
push 0x1000
push esi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push esi
push 0
push eax
mov dword [edi - 8], eax
call fcn.10022540
jmp 0x10014049
push 4
push 0x1000
push eax
mov eax, dword [edi - 4]
add eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push dword [edi]
mov ecx, dword [edi + 4]
mov esi, eax
add ecx, dword [ebp - 8]
push ecx
push esi
call fcn.10021a40
mov dword [edi - 8], esi
mov edx, dword [ebp - 4]
add esp, 0xc
mov ecx, dword [edx]
add edi, 0x28
mov esi, dword [ebp - 0x14]
inc esi
mov dword [ebp - 0x14], esi
movzx eax, word [ecx + 6]
cmp esi, eax
jl 0x10013ff0
mov edx, dword [edx + 4]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0xc]
mov esi, edx
sub eax, dword [ebx + 0x34]
mov ebx, ecx
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], esi
je 0x100140f5
cmp dword [ecx + 0xa4], 0
mov dword [ebp - 8], esi
jbe 0x100140f5
mov edi, dword [ecx + 0xa0]
add edi, edx
mov dword [ebp - 8], edx
mov eax, dword [edi]
test eax, eax
je 0x100140f5
mov ecx, dword [edi + 4]
lea ebx, [eax + edx]
xor esi, esi
lea edx, [edi + 8]
lea eax, [ecx - 8]
test eax, 0xfffffffe
jbe 0x100140de
nop dword [eax]
movzx eax, word [edx]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x100140ce
mov ecx, dword [ebp - 0x14]
and eax, 0xfff
add dword [eax + ebx], ecx
mov ecx, dword [edi + 4]
inc esi
add edx, 2
lea eax, [ecx - 8]
shr eax, 1
cmp esi, eax
jb 0x100140b0
mov eax, dword [edi + ecx]
add edi, ecx
mov edx, dword [ebp - 0x10]
test eax, eax
jne 0x10014098
mov eax, dword [ebp - 4]
mov esi, dword [eax + 4]
mov ebx, dword [eax]
mov dword [ebp - 8], esi
cmp dword [ebx + 0x84], 0
jbe 0x100141f1
mov ebx, dword [ebx + 0x80]
mov eax, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
add ebx, esi
push 0x14
push ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x18], eax
call eax
test eax, eax
jne 0x100141f1
mov ecx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x14], eax
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x100141f1
add eax, esi
push eax
call ecx
mov edi, eax
test edi, edi
je 0x100141e5
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0xc]
lea ecx, [ecx*4 + 4]
push ecx
push dword [eax + 8]
call fcn.1002c5b8
mov edx, dword [ebp - 4]
add esp, 8
mov dword [edx + 8], eax
test eax, eax
je 0x100141e1
mov ecx, dword [edx + 0xc]
mov dword [eax + ecx*4], edi
inc dword [edx + 0xc]
mov eax, dword [ebx]
test eax, eax
jne 0x10014182
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebp - 8]
mov ebx, dword [ebx + 0x10]
add ebx, ecx
lea esi, [ecx + eax]
mov eax, dword [esi]
test eax, eax
je 0x100141bc
sub ebx, esi
test eax, eax
jns 0x1001419e
movzx eax, ax
jmp 0x100141a3
add ecx, 2
add eax, ecx
push eax
push edi
call dword [ebp - 0x14]
mov dword [ebx + esi], eax
test eax, eax
je 0x100141da
mov eax, dword [esi + 4]
add esi, 4
mov ecx, dword [ebp - 8]
test eax, eax
jne 0x10014197
mov ebx, dword [ebp - 0x10]
add ebx, 0x14
push 0x14
push ebx
mov dword [ebp - 0x10], ebx
call dword [ebp - 0x18]
mov esi, dword [ebp - 8]
test eax, eax
jne 0x100141f1
mov ecx, dword [ebp - 0x1c]
jmp 0x10014133
mov esi, dword [ebp - 8]
xor eax, eax
jmp 0x100141f6
xor eax, eax
jmp 0x100141f9
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x1c]
jmp 0x100141f6
mov eax, 1
mov edx, dword [ebp - 4]
mov word [esi], 0x5958
test eax, eax
je 0x10014360
mov esi, dword [edx]
xor eax, eax
mov dword [ebp - 0x14], 0
movzx edi, word [esi + 0x14]
add edi, 0x28
cmp ax, word [esi + 6]
jae 0x10014334
add edi, esi
mov ebx, dword [edi + 0x14]
mov edx, dword [edi]
test ebx, 0x2000000
je 0x10014245
push 0x4000
push edx
push dword [edi - 8]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
jmp 0x10014319
mov ecx, ebx
mov eax, ebx
shr eax, 0x1e
and eax, 1
shr ecx, 0x1d
and ecx, 1
lea ecx, [eax + ecx*2]
mov eax, ebx
shr eax, 0x1f
lea eax, [eax + ecx*2]
mov ecx, dword [eax*4 + 0x100569d8]
mov eax, ebx
mov dword [ebp - 0x10], ecx
or dword [ebp - 0x10], 0x200
and eax, 0x4000000
mov eax, dword [ebp - 0x10]
cmove eax, ecx
test edx, edx
jne 0x1001429f
test bl, 0x40
je 0x1001428c
mov edx, dword [esi + 0x20]
jmp 0x10014297
test bl, bl
jns 0x10014319
mov edx, dword [esi + 0x24]
test edx, edx
je 0x10014319
lea ecx, [ebp - 0x1c]
push ecx
push eax
push edx
push dword [edi - 8]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
jne 0x10014319
push eax
push eax
lea eax, [ebp - 8]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
mov ecx, dword [ebp - 8]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100142d7
sub ecx, edx
lea eax, [ecx + 0x1f]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push dword [ebp - 8]
mov esi, eax
push str.Error_protecting_memory_page
push str._s:__s
push esi
call fcn.100012b0
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
push esi
call ebx
push dword [ebp - 8]
call ebx
mov edx, dword [ebp - 4]
add edi, 0x28
mov ecx, dword [ebp - 0x14]
inc ecx
mov dword [ebp - 0x14], ecx
mov esi, dword [edx]
movzx eax, word [esi + 6]
cmp ecx, eax
jl 0x10014224
mov eax, dword [esi + 0x28]
test eax, eax
je 0x10014357
mov ecx, dword [ebp - 0xc]
add eax, ecx
je 0x10014360
push 0
push 1
push ecx
call eax
test eax, eax
je 0x10014360
mov edx, dword [ebp - 4]
mov dword [edx + 0x10], 1
pop edi
pop esi
mov eax, edx
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
call fcn.100147a0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret