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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, 0x5a4d
mov dword [ebp - 4], 0
cmp word [0x1000f150], ax
je 0x100016ac
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov esp, ebp
pop ebp
ret
push ebx
mov ebx, dword [0x1000f18c]
lea ecx, [ebx + 0xf8]
cmp ecx, 0x1b5800
jbe 0x100016d0
push 0xd
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebx + 0x1000f150], 0x4550
lea ebx, [ebx + 0x1000f150]
jne 0x100016f5
mov edx, 0x14c
cmp word [ebx + 4], dx
jne 0x100016f5
mov edx, dword [ebx + 0x38]
test dl, 1
je 0x10001707
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
movzx eax, word [ebx + 0x14]
lea ecx, [eax + ebx + 0x18]
movzx eax, word [ebx + 6]
push esi
push edi
test eax, eax
je 0x1000173d
lea esi, [ecx + 0xc]
mov edi, eax
mov edi, edi
mov ecx, dword [esi + 4]
mov eax, dword [esi]
test ecx, ecx
jne 0x1000172d
add eax, edx
jmp 0x1000172f
add eax, ecx
cmp eax, dword [ebp - 4]
jbe 0x10001737
mov dword [ebp - 4], eax
add esi, 0x28
dec edi
jne 0x10001720
lea ecx, [ebp - 0x28]
push ecx
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 0x10001779
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 0x100017a6
push 4
push 0x3000
push esi
push eax
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test edi, edi
je 0x100017ca
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 0x100017db
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 dword [esi + 0x1c], 0x10001640
mov dword [esi + 0x20], 0x10001650
mov dword [esi + 0x24], 0x10001670
mov dword [esi + 0x28], 0
mov ecx, dword [ebp - 0x24]
mov dword [esi + 0x30], ecx
mov edx, dword [ebx + 0x54]
push edx
call fcn.100010d0
test eax, eax
je 0x100018c1
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]
push ecx
push 0x1000f150
push eax
mov dword [ebp - 4], eax
call fcn.100031c0
mov eax, dword [ebp - 4]
add eax, dword [0x1000f18c]
add esp, 0xc
push esi
mov dword [esi], eax
push ebx
mov dword [eax + 0x34], edi
call fcn.10001100
test eax, eax
je 0x100018c1
mov ecx, dword [esi]
mov eax, dword [ecx + 0x34]
sub eax, dword [ebx + 0x34]
je 0x10001875
push eax
mov eax, esi
call fcn.10001420
mov dword [esi + 0x18], eax
jmp 0x1000187c
mov dword [esi + 0x18], 1
call fcn.100014c0
test eax, eax
je 0x100018c1
push esi
call fcn.100012a0
test eax, eax
je 0x100018c1
mov eax, esi
call fcn.100013e0
test eax, eax
je 0x100018c1
mov edx, dword [esi]
mov eax, dword [edx + 0x28]
test eax, eax
je 0x100018eb
add eax, edi
cmp dword [esi + 0x14], 0
je 0x100018df
push 0
push 1
push edi
call eax
test eax, eax
jne 0x100018cf
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.10001900
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