Function at 0x10001eb0
Capabilities:
Enumerate pe sections
Get system information on windows
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 4], 0
cmp ecx, 0x40
jae 0x10001ed3
push 0xd
call dword [sym.imp.KERNEL32.DLL_SetLastError]
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
mov edx, 0x5a4d
cmp word [eax], dx
je 0x10001ef1
push 0xc1
call dword [sym.imp.KERNEL32.DLL_SetLastError]
xor eax, eax
mov esp, ebp
pop ebp
ret
push ebx
mov ebx, dword [eax + 0x3c]
lea edx, [ebx + 0xf8]
cmp ecx, edx
jae 0x10001f0e
push 0xd
call dword [sym.imp.KERNEL32.DLL_SetLastError]
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
add ebx, eax
cmp dword [ebx], 0x4550
jne 0x10001f2b
mov eax, 0x14c
cmp word [ebx + 4], ax
jne 0x10001f2b
mov edx, dword [ebx + 0x38]
test dl, 1
je 0x10001f3d
push 0xc1
call dword [sym.imp.KERNEL32.DLL_SetLastError]
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
movzx eax, word [ebx + 6]
movzx ecx, word [ebx + 0x14]
push esi
push edi
lea ecx, [ecx + ebx + 0x18]
test eax, eax
je 0x10001f71
lea esi, [ecx + 0xc]
mov edi, eax
mov ecx, dword [esi + 4]
mov eax, dword [esi]
test ecx, ecx
jne 0x10001f61
add eax, edx
jmp 0x10001f63
add eax, ecx
cmp eax, dword [ebp - 4]
jbe 0x10001f6b
mov dword [ebp - 4], eax
add esi, 0x28
dec edi
jne 0x10001f54
lea edx, [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.DLL_GetNativeSystemInfo]
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebx + 0x50]
lea esi, [edx + ecx - 1]
mov edx, dword [ebp - 4]
lea eax, [ecx - 1]
not eax
lea ecx, [ecx + edx - 1]
and esi, eax
and ecx, eax
cmp esi, ecx
je 0x10001fad
push 0xc1
call dword [sym.imp.KERNEL32.DLL_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebx + 0x34]
push 4
push 0x3000
push esi
push edx
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov edi, eax
test edi, edi
jne 0x10001fda
push 4
push 0x3000
push esi
push eax
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov edi, eax
test edi, edi
je 0x10001ffe
push 0x34
push 8
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
mov esi, eax
test esi, esi
jne 0x1000200f
push 0x8000
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_VirtualFree]
push 0xe
call dword [sym.imp.KERNEL32.DLL_SetLastError]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 4], edi
movzx eax, word [ebx + 0x16]
shr eax, 0xd
and eax, 1
mov dword [esi + 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x1c], 0x10001e70
mov dword [esi + 0x20], 0x10001e80
mov dword [esi + 0x24], 0x10001ea0
mov dword [esi + 0x28], 0
mov ecx, dword [ebp - 0x24]
mov dword [esi + 0x30], ecx
mov edx, dword [ebx + 0x54]
push edx
call fcn.10001920
add esp, 4
test eax, eax
je 0x10002105
mov eax, dword [ebx + 0x54]
push 4
push 0x1000
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_VirtualAlloc]
mov ecx, dword [ebx + 0x54]
mov edx, dword [ebp + 8]
push ecx
push edx
push eax
mov dword [ebp - 4], eax
call fcn.1000ea00
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x3c]
add eax, dword [ebp - 4]
push esi
mov dword [esi], eax
mov dword [eax + 0x34], edi
mov eax, dword [ebp + 0xc]
push ebx
push eax
push ecx
call fcn.10001940
add esp, 0x1c
test eax, eax
je 0x10002105
mov ecx, dword [esi]
mov eax, dword [ecx + 0x34]
sub eax, dword [ebx + 0x34]
je 0x100020b6
push eax
mov eax, esi
call fcn.10001c50
add esp, 4
mov dword [esi + 0x18], eax
jmp 0x100020bd
mov dword [esi + 0x18], 1
call fcn.10001cf0
test eax, eax
je 0x10002105
push esi
call fcn.10001ad0
add esp, 4
test eax, eax
je 0x10002105
mov eax, esi
call fcn.10001c10
test eax, eax
je 0x10002105
mov edx, dword [esi]
mov eax, dword [edx + 0x28]
test eax, eax
je 0x1000212f
add eax, edi
cmp dword [esi + 0x14], 0
je 0x10002123
push 0
push 1
push edi
call eax
test eax, eax
jne 0x10002113
push 0x45a
call dword [sym.imp.KERNEL32.DLL_SetLastError]
call fcn.10002230
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov dword [esi + 0x10], 1
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x2c], eax
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
mov dword [esi + 0x2c], 0
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret