Function at 0x408c3a
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov ecx, dword [ebp + 8]
xor edx, edx
and dword [ebp - 0xc], edx
push ebx
push esi
mov ebx, dword [ecx + 0x3c]
add ebx, ecx
mov dword [ebp - 4], edx
push edi
mov edi, dword [ebp + 0x14]
add dword [ebp + 0xc], edi
movzx ecx, word [ebx + 6]
lea esi, [ebx + 0x18]
movzx eax, word [ebx + 0x14]
add esi, eax
mov dword [ebp - 8], ebx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x10], esi
test ecx, ecx
je 0x408e62
cmp dword [ebp + 0x1c], 0x256
jb 0x408e5f
push esi
call fcn.00405452
test al, al
jne 0x408e49
push esi
call fcn.00405426
test al, al
jne 0x408e49
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 8]
mov edx, dword [ebx + 0xdc]
cmp eax, dword [ebx + 0xd8]
jne 0x408cc0
cmp edx, ecx
jae 0x408e49
add eax, edx
sub ecx, edx
lea edx, [ecx + eax]
add edi, eax
mov ecx, dword [ebp + 8]
add edx, ecx
mov dword [ebp - 0x1c], edx
lea ebx, [eax + ecx]
cmp ebx, edx
jae 0x408e43
mov ecx, dword [ebp + 0x1c]
cmp ecx, 0x256
jb 0x408e40
mov al, byte [edi]
cmp al, byte [ebx]
jne 0x408cf4
inc edi
inc ebx
jmp 0x408e38
push edx
push edi
push ebx
call fcn.00409c44
mov esi, eax
lea eax, [esi - 1]
cmp eax, 0x30
ja 0x408e29
push esi
push ebx
call fcn.0040a940
cmp al, 1
jne 0x408e29
push esi
push edi
call fcn.0040a940
cmp al, 1
jne 0x408e29
push dword [ebp + 0xc]
push edi
call fcn.0040aa20
test al, al
jne 0x408e29
push dword [ebp + 0x24]
mov eax, edi
sub eax, dword [ebp + 0x14]
add eax, dword [ebp + 0x10]
push dword [ebp + 0x20]
mov dword [ebp - 0x14], eax
push eax
call fcn.00409c7e
test al, al
jne 0x408e29
lea eax, [esi*2 + 0x254]
cmp dword [ebp + 0x1c], eax
jb 0x408e21
mov eax, dword [ebp + 0x18]
lea ecx, [esi + 0x10]
mov edx, dword [ebp - 0x14]
and dword [eax + 4], 0
mov dword [eax], edx
lea eax, [ecx + edi]
cmp eax, dword [ebp + 0xc]
jbe 0x408d84
mov ecx, dword [ebp + 0xc]
sub ecx, edi
lea eax, [ebp - 0x18]
push eax
push edx
push ecx
push edi
call fcn.004066b0
cmp al, 1
jne 0x408d9d
mov ecx, dword [ebp + 0x18]
mov eax, dword [ebp - 0x18]
mov dword [ecx + 4], eax
mov eax, dword [ebp + 0x18]
xor edx, edx
lea ecx, [eax + 8]
mov dword [ebp - 0x14], ecx
mov word [ecx], dx
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x408ddb
push ecx
call fcn.0040a248
test eax, eax
je 0x408dd8
push 0x104
push eax
push dword [ebp - 0x14]
call fcn.0047d8b0
mov eax, dword [ebp + 0x18]
xor ecx, ecx
mov word [eax + 0x20e], cx
jmp 0x408ddb
mov eax, dword [ebp + 0x18]
mov byte [eax + 0x210], 0
push esi
mov dword [eax + 0x250], esi
add eax, 0x254
push ebx
push eax
call sub.ntoskrnl.exe_memcpy
mov eax, dword [ebp + 0x18]
push esi
add eax, 0x254
add eax, esi
push edi
push eax
call sub.ntoskrnl.exe_memcpy
mov ecx, dword [ebp + 0x1c]
lea eax, [esi*2 + 0x254]
add dword [ebp + 0x18], eax
sub ecx, eax
add esp, 0x18
mov dword [ebp + 0x1c], ecx
inc dword [ebp - 4]
jmp 0x408e2c
xor ecx, ecx
inc ecx
mov dword [ebp + 0x1c], ecx
jmp 0x408e2c
mov ecx, dword [ebp + 0x1c]
test esi, esi
jne 0x408e31
inc esi
mov edx, dword [ebp - 0x1c]
add edi, esi
add ebx, esi
cmp ebx, edx
jb 0x408cdb
mov esi, dword [ebp - 0x10]
mov edi, dword [ebp + 0x14]
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
add esi, 0x28
inc eax
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], eax
cmp eax, dword [ebp - 0x20]
jb 0x408c77
mov edx, dword [ebp - 4]
pop edi
pop esi
mov eax, edx
pop ebx
mov esp, ebp
pop ebp
ret 0x20