Function at 0x402180
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, eax
xor eax, eax
mov dword [ebp - 4], eax
test ebx, ebx
je 0x4023e8
push esi
push edi
mov edi, dword [0x4040d0]
xor esi, esi
mov eax, ebx
call fcn.00402870
test eax, eax
jne 0x4021b5
push 0x64
call edi
inc esi
cmp esi, 0x1e
jl 0x4021a0
mov eax, ebx
call fcn.00402870
test eax, eax
je 0x4023e3
push ebx
push 0
push 0x1f0fff
call dword [0x4040f0]
mov esi, eax
mov dword [ebp - 0x10], esi
test esi, esi
je 0x4023e3
push 0x404550
mov dword [ebp - 8], 0
call dword [0x4040b8]
mov ebx, dword [0x4040b4]
test eax, eax
je 0x402216
push 0x404560
push eax
call ebx
mov edi, eax
test edi, edi
je 0x402216
lea eax, [ebp - 8]
push eax
call dword [0x4040cc]
push eax
call edi
cmp dword [ebp - 8], 0
je 0x40224f
push 0x404550
mov dword [ebp - 8], 0
call dword [0x4040b8]
test eax, eax
je 0x402245
push 0x404560
push eax
call ebx
test eax, eax
je 0x402245
lea ecx, [ebp - 8]
push ecx
push esi
call eax
cmp dword [ebp - 8], 0
je 0x4023c0
mov ebx, dword [0x40643c]
lea ebx, [ebx + 0x406400]
xor edx, edx
push 0x40
mov dword [ebx + 0x58], 0x50200
mov word [0x406400], dx
mov eax, dword [ebx + 0x50]
push 0x3000
add eax, 0x50200
push eax
push edx
push esi
mov dword [ebx], edx
call dword [0x404100]
mov edi, eax
mov dword [ebp - 0xc], edi
test edi, edi
je 0x4023c0
mov ecx, dword [ebx + 0x54]
lea eax, [ebp - 0x14]
push eax
push ecx
push 0x406400
push edi
push esi
call dword [0x404118]
movzx edx, word [ebx + 0x14]
xor ecx, ecx
lea eax, [edx + ebx + 0x18]
mov dword [ebp - 8], 0
cmp cx, word [ebx + 6]
jae 0x40232f
lea esi, [eax + 8]
mov edx, dword [esi]
push 4
push 0x3000
push edx
push 0
call dword [0x4040d8]
mov edi, eax
test edi, edi
je 0x402317
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
push eax
add ecx, 0x406400
push ecx
push edi
call 0x40471e
mov eax, dword [esi]
mov ecx, dword [esi + 4]
add ecx, dword [ebp - 0xc]
add esp, 0xc
lea edx, [ebp - 0x14]
push edx
mov edx, dword [ebp - 0x10]
push eax
push edi
push ecx
push edx
call dword [0x404118]
push 0x8000
push 0
push edi
call dword [0x4040e8]
mov eax, dword [ebp - 8]
movzx ecx, word [ebx + 6]
inc eax
add esi, 0x28
mov dword [ebp - 8], eax
cmp eax, ecx
jl 0x4022c1
mov edi, dword [ebp - 0xc]
mov esi, dword [ebp - 0x10]
mov eax, dword [ebx + 0x50]
lea edx, [ebp - 0x14]
push edx
push 0x50200
push 0x406400
add eax, edi
push eax
push esi
call dword [0x404118]
mov ebx, dword [ebx + 0x28]
push 0
push 0
push esi
add ebx, edi
call dword [0x4040d4]
push 0
push 0
push 0
push ebx
push 0
push 0
push esi
call dword [0x4040ec]
mov edi, eax
test edi, edi
je 0x40239e
lea ecx, [ebp - 0x10]
push ecx
push edi
mov dword [ebp - 0x10], 0
call dword [0x4040fc]
test eax, eax
je 0x402395
test byte [ebp - 0x10], 2
jne 0x402395
push edi
call dword [0x404114]
mov dword [ebp - 4], 1
jmp 0x4023c0
push 0
push 0
push 0
push ebx
push 0
push 0
push 0
push 0
push 0
push esi
call dword [0x4041a4]
xor edx, edx
test eax, eax
setns dl
mov dword [ebp - 4], edx
lea eax, [ebp - 0x10]
push eax
push esi
mov dword [ebp - 0x10], 0
call dword [0x4040fc]
test eax, eax
je 0x4023e3
test byte [ebp - 0x10], 2
jne 0x4023e3
push esi
call dword [0x404114]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret