Function at 0x4019c1
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
and dword [ebp - 4], 0
push ebx
push esi
push edi
push 0x40
push dword [ebp + 0xc]
call fcn.00401c2f
pop ecx
test eax, eax
pop ecx
je 0x401c15
mov esi, dword [ebp + 8]
cmp word [esi], 0x5a4d
je 0x4019fc
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x401c15
mov eax, dword [esi + 0x3c]
add eax, 0xf8
push eax
push dword [ebp + 0xc]
call fcn.00401c2f
pop ecx
test eax, eax
pop ecx
je 0x401c15
mov edi, dword [esi + 0x3c]
add edi, esi
cmp dword [edi], 0x4550
jne 0x4019ec
cmp word [edi + 4], 0x14c
jne 0x4019ec
mov ebx, dword [edi + 0x38]
test bl, 1
jne 0x4019ec
movzx eax, word [edi + 0x14]
movzx edx, word [edi + 6]
test edx, edx
lea eax, [eax + edi + 0x18]
jbe 0x401a64
lea ecx, [eax + 0xc]
mov esi, dword [ecx + 4]
mov eax, dword [ecx]
test esi, esi
jne 0x401a54
add eax, ebx
jmp 0x401a56
add eax, esi
cmp eax, dword [ebp - 4]
jbe 0x401a5e
mov dword [ebp - 4], eax
add ecx, 0x28
dec edx
jne 0x401a47
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x401c15
push 0
push str.GetNativeSystemInfo
push eax
call dword [ebp + 0x1c]
add esp, 0xc
test eax, eax
je 0x401c15
lea ecx, [ebp - 0x28]
push ecx
call eax
mov eax, dword [ebp - 0x24]
mov edx, dword [edi + 0x50]
lea esi, [edx + eax - 1]
mov edx, dword [ebp - 4]
lea ecx, [eax - 1]
not ecx
lea eax, [eax + edx - 1]
and esi, ecx
and eax, ecx
cmp esi, eax
jne 0x4019ec
push dword [ebp + 0x24]
push 4
push 0x3000
push esi
push dword [edi + 0x34]
call dword [ebp + 0x10]
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x401ae7
push dword [ebp + 0x24]
push 4
push 0x3000
push esi
push eax
call dword [ebp + 0x10]
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x401b0e
push 0x3c
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 0x401b15
push dword [ebp + 0x24]
push 0x8000
push eax
push ebx
call dword [ebp + 0x14]
add esp, 0x10
push 0xe
jmp 0x4019f1
mov dword [esi + 4], ebx
mov ax, word [edi + 0x16]
shr eax, 0xd
and eax, 1
mov dword [esi + 0x14], eax
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x1c], eax
mov eax, dword [ebp + 0x14]
mov dword [esi + 0x20], eax
mov eax, dword [ebp + 0x18]
mov dword [esi + 0x24], eax
mov eax, dword [ebp + 0x1c]
mov dword [esi + 0x28], eax
mov eax, dword [ebp + 0x20]
mov dword [esi + 0x2c], eax
mov eax, dword [ebp + 0x24]
mov dword [esi + 0x30], eax
mov eax, dword [ebp - 0x24]
mov dword [esi + 0x38], eax
push dword [edi + 0x54]
push dword [ebp + 0xc]
call fcn.00401c2f
pop ecx
test eax, eax
pop ecx
je 0x401c0e
push dword [ebp + 0x24]
push 4
push 0x1000
push dword [edi + 0x54]
push ebx
call dword [ebp + 0x10]
push dword [edi + 0x54]
mov dword [ebp + 0x24], eax
push dword [ebp + 8]
push eax
call sub.MSVCRT.dll_memcpy
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0x24]
push esi
push edi
mov eax, dword [ecx + 0x3c]
push dword [ebp + 0xc]
add eax, edx
mov dword [esi], eax
push ecx
mov dword [eax + 0x34], ebx
call fcn.00401c48
add esp, 0x30
test eax, eax
je 0x401c0e
mov eax, dword [esi]
mov eax, dword [eax + 0x34]
sub eax, dword [edi + 0x34]
je 0x401bc1
push eax
push esi
call fcn.00401f30
pop ecx
mov dword [esi + 0x18], eax
pop ecx
push 1
pop edi
jmp 0x401bc7
push 1
pop edi
mov dword [esi + 0x18], edi
push esi
call fcn.00401fb7
test eax, eax
pop ecx
je 0x401c0e
push esi
call fcn.00401d23
test eax, eax
pop ecx
je 0x401c0e
push esi
call fcn.00401ef5
test eax, eax
pop ecx
je 0x401c0e
mov eax, dword [esi]
xor ecx, ecx
mov eax, dword [eax + 0x28]
cmp eax, ecx
je 0x401c25
cmp dword [esi + 0x14], ecx
je 0x401c1e
push ecx
push edi
add eax, ebx
push ebx
call eax
test eax, eax
jne 0x401c19
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
call fcn.004021a4
pop ecx
xor eax, eax
jmp 0x401c2a
mov dword [esi + 0x10], edi
jmp 0x401c28
add eax, ebx
mov dword [esi + 0x34], eax
jmp 0x401c28
mov dword [esi + 0x34], ecx
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret