Function at 0x10001030
Capabilities:
Access peb ldr_data
Enumerate pe sections
Get kernel32 base address
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov dword [ebp - 0x28], 0
push 0x10004040
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x28], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x20], 0
push 0x40
mov eax, dword [ebp + 0xc]
push eax
call fcn.10001b30
add esp, 8
test eax, eax
jne 0x1000107e
xor eax, eax
jmp 0x1000148d
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x14]
movzx eax, word [edx]
cmp eax, 0x5a4d
je 0x100010a3
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1000148d
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0x3c]
add edx, 0xf8
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.10001b30
add esp, 8
test eax, eax
jne 0x100010c7
xor eax, eax
jmp 0x1000148d
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
add edx, dword [ecx + 0x3c]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
cmp dword [eax], 0x4550
je 0x100010f0
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1000148d
mov ecx, dword [ebp - 8]
movzx edx, word [ecx + 4]
cmp edx, 0x14c
je 0x10001111
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1000148d
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x38]
and ecx, 1
je 0x1000112e
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1000148d
mov edx, dword [ebp - 8]
movzx eax, word [edx + 0x14]
mov ecx, dword [ebp - 8]
lea edx, [ecx + eax + 0x18]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x38]
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0x18], 0
jmp 0x10001163
mov edx, dword [ebp - 0x18]
add edx, 1
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x10]
add eax, 0x28
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 8]
movzx edx, word [ecx + 6]
cmp dword [ebp - 0x18], edx
jae 0x100011a5
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x10], 0
jne 0x10001186
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0xc]
add edx, dword [ebp - 0x3c]
mov dword [ebp - 0x1c], edx
jmp 0x10001195
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0xc]
mov edx, dword [ebp - 0x10]
add ecx, dword [edx + 0x10]
mov dword [ebp - 0x1c], ecx
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x20]
jbe 0x100011a3
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], ecx
jmp 0x10001151
lea edx, [ebp - 0x68]
push edx
call dword [ebp - 0x28]
mov eax, dword [ebp - 0x64]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x50]
push edx
call fcn.100018d0
add esp, 8
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x64]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.100018d0
add esp, 8
cmp dword [ebp - 0x24], eax
je 0x100011e9
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1000148d
mov edx, dword [ebp + 0x24]
push edx
push 4
push 0x3000
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x34]
push edx
call dword [ebp + 0x10]
add esp, 0x14
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x1000123d
mov eax, dword [ebp + 0x24]
push eax
push 4
push 0x3000
mov ecx, dword [ebp - 0x24]
push ecx
push 0
call dword [ebp + 0x10]
add esp, 0x14
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x1000123d
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1000148d
push 0x40
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x1000127b
mov edx, dword [ebp + 0x24]
push edx
push 0x8000
push 0
mov eax, dword [ebp - 0xc]
push eax
call dword [ebp + 0x14]
add esp, 0x10
push 0xe
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1000148d
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
mov dword [ecx + 4], edx
mov eax, dword [ebp - 8]
movzx ecx, word [eax + 0x16]
and ecx, 0x2000
je 0x1000129c
mov dword [ebp - 0x2c], 1
jmp 0x100012a3
mov dword [ebp - 0x2c], 0
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x2c]
mov dword [edx + 0x14], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0x10]
mov dword [ecx + 0x1c], edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x14]
mov dword [eax + 0x20], ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 0x18]
mov dword [edx + 0x24], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0x1c]
mov dword [ecx + 0x28], edx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x20]
mov dword [eax + 0x2c], ecx
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 0x24]
mov dword [edx + 0x34], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x64]
mov dword [ecx + 0x3c], edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0x54]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.10001b30
add esp, 8
test eax, eax
jne 0x10001307
jmp 0x1000147f
mov eax, dword [ebp + 0x24]
push eax
push 4
push 0x1000
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x54]
push edx
mov eax, dword [ebp - 0xc]
push eax
call dword [ebp + 0x10]
add esp, 0x14
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x54]
push edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.10001980
add esp, 0xc
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x30]
add eax, dword [edx + 0x3c]
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx]
mov ecx, dword [ebp - 0xc]
mov dword [eax + 0x34], ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.10001b50
add esp, 0x10
test eax, eax
jne 0x10001377
jmp 0x1000147f
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov edx, dword [ebp - 8]
mov eax, dword [ecx + 0x34]
sub eax, dword [edx + 0x34]
mov dword [ebp - 0x34], eax
je 0x100013a2
mov ecx, dword [ebp - 0x34]
push ecx
mov edx, dword [ebp - 4]
push edx
call fcn.10002090
add esp, 8
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x18], eax
jmp 0x100013ac
mov edx, dword [ebp - 4]
mov dword [edx + 0x18], 1
mov eax, dword [ebp - 4]
push eax
call fcn.100021a0
add esp, 4
test eax, eax
jne 0x100013c1
jmp 0x1000147f
mov ecx, dword [ebp - 4]
push ecx
call fcn.10001e80
add esp, 4
test eax, eax
jne 0x100013d6
jmp 0x1000147f
mov edx, dword [ebp - 4]
push edx
call fcn.10002010
add esp, 4
test eax, eax
jne 0x100013eb
jmp 0x1000147f
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
cmp dword [ecx + 0x28], 0
je 0x10001470
mov edx, 1
test edx, edx
je 0x1000145d
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov edx, dword [ebp - 0xc]
add edx, dword [ecx + 0x28]
mov dword [ebp - 0x44], edx
mov eax, dword fs:[0x30]
mov dword [ebp - 0x38], eax
mov ecx, 4
shl ecx, 0
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 0xc]
mov dword [edx + ecx + 4], eax
mov ecx, dword [ebp - 0x38]
mov edx, dword [ecx + 0xc]
mov eax, 4
shl eax, 0
mov ecx, dword [edx + eax + 8]
mov edx, dword [ebp - 0xc]
mov dword [ecx + 0x18], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x28]
add edx, dword [ebp - 0xc]
mov dword [ebp - 0x40], edx
call dword [ebp - 0x40]
mov eax, dword [ebp - 4]
mov dword [eax + 0x10], 1
jmp 0x1000146e
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
mov eax, dword [ebp - 0xc]
add eax, dword [edx + 0x28]
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x38], eax
jmp 0x1000147a
mov edx, dword [ebp - 4]
mov dword [edx + 0x38], 0
mov eax, dword [ebp - 4]
jmp 0x1000148d
mov eax, dword [ebp - 4]
push eax
call fcn.100016c0
add esp, 4
xor eax, eax
mov esp, ebp
pop ebp
ret