Function at 0x511058
Capabilities:
Enumerate pe sections

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffb0
mov edi, edx
mov dword [esp], eax
mov eax, dword [esp]
mov eax, dword [eax + 8]
test eax, eax
je 0x511073
sub eax, 4
mov eax, dword [eax]
mov ebx, edi
sub ebx, eax
test ebx, ebx
je 0x511493
mov eax, dword [esp]
mov eax, dword [eax]
mov edx, dword [esp]
cmp eax, dword [edx + 4]
jl 0x5110a2
mov eax, dword [esp]
mov eax, dword [eax]
mov edx, dword [esp]
cmp eax, dword [edx + 4]
jne 0x5110bb
mov eax, dword [esp]
cmp dword [eax + 0xc], 0
jle 0x5110bb
mov eax, dword [esp]
mov eax, dword [eax + 8]
test eax, eax
je 0x5110b1
sub eax, 4
mov eax, dword [eax]
mov edx, dword [esp]
mov ebp, eax
sub ebp, dword [edx + 4]
jmp 0x5110bd
xor ebp, ebp
test ebx, ebx
jle 0x5110ce
mov eax, dword [esp]
add eax, 8
mov edx, edi
call fcn.00510810
mov esi, dword [esp]
mov esi, dword [esi + 8]
test ebp, ebp
jle 0x5112fa
mov eax, dword [esp]
add eax, 8
mov dword [esp + 4], eax
mov eax, dword [esp]
add eax, 8
mov dword [esp + 8], eax
mov eax, dword [esp]
add eax, 8
mov dword [esp + 0xc], eax
mov eax, dword [esp]
add eax, 8
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 8]
mov edx, dword [esp + 0x10]
mov edx, dword [edx + 8]
movzx edx, byte [edx + 1]
add eax, edx
mov eax, dword [eax + 2]
push eax
push ebp
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 8]
mov edx, dword [esp + 0x14]
mov edx, dword [edx + 8]
movzx edx, byte [edx + 1]
add eax, edx
mov eax, dword [eax + 6]
mov ecx, dword [eax]
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 8]
mov edx, dword [esp + 0x10]
mov edx, dword [edx + 8]
movzx edx, byte [edx + 1]
add eax, edx
mov eax, dword [eax + 2]
mov edx, dword [esp + 8]
imul dword [edx + 4]
lea edx, [esi + eax]
mov eax, dword [esp + 0xc]
mov eax, dword [eax + 8]
mov ebp, dword [esp + 0xc]
mov ebp, dword [ebp + 8]
movzx ebp, byte [ebp + 1]
add eax, ebp
mov eax, dword [eax + 2]
mov ebp, dword [esp + 8]
mov ebp, dword [ebp + 4]
add ebp, ebx
imul eax, ebp
lea eax, [esi + eax]
call fcn.0050c4f8
test ebx, ebx
jle 0x511239
mov eax, dword [esp]
add eax, 8
mov dword [esp + 0x14], eax
mov eax, dword [esp]
add eax, 8
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 8]
mov edx, dword [esp + 0x18]
mov edx, dword [edx + 8]
movzx edx, byte [edx + 1]
add eax, edx
mov eax, dword [eax + 6]
mov edx, dword [eax]
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 8]
mov ecx, dword [esp + 0x14]
mov ecx, dword [ecx + 8]
movzx ecx, byte [ecx + 1]
add eax, ecx
mov eax, dword [eax + 2]
mov ecx, dword [esp]
imul eax, dword [ecx + 4]
lea eax, [esi + eax]
mov ecx, ebx
call fcn.0040c670
mov eax, dword [esp]
add eax, 8
mov dword [esp + 0x1c], eax
mov eax, dword [esp]
add eax, 8
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 8]
mov edx, dword [esp + 0x20]
mov edx, dword [edx + 8]
movzx edx, byte [edx + 1]
add eax, edx
mov eax, dword [eax + 6]
mov edx, dword [eax]
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 8]
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx + 8]
movzx ecx, byte [ecx + 1]
add eax, ecx
mov eax, dword [eax + 2]
mov ecx, dword [esp]
imul eax, dword [ecx + 4]
lea eax, [esi + eax]
mov ecx, ebx
call fcn.0040b750
jmp 0x5112ef
test ebx, ebx
jge 0x5112ef
mov eax, dword [esp]
add eax, 8
mov dword [esp + 0x24], eax
mov eax, dword [esp]
add eax, 8
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x28]
mov eax, dword [eax + 8]
mov edx, dword [esp + 0x28]
mov edx, dword [edx + 8]
movzx edx, byte [edx + 1]
add eax, edx
mov eax, dword [eax + 6]
mov edx, dword [eax]
mov eax, dword [esp + 0x24]
mov eax, dword [eax + 8]
mov ecx, dword [esp + 0x24]
mov ecx, dword [ecx + 8]
movzx ecx, byte [ecx + 1]
add eax, ecx
mov eax, dword [eax + 2]
mov ecx, dword [esp]
imul eax, dword [ecx + 0xc]
lea eax, [esi + eax]
mov ebp, ebx
neg ebp
mov ecx, ebp
call fcn.0040c670
mov eax, dword [esp]
add eax, 8
mov dword [esp + 0x2c], eax
mov eax, dword [esp]
add eax, 8
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x30]
mov eax, dword [eax + 8]
mov edx, dword [esp + 0x30]
mov edx, dword [edx + 8]
movzx edx, byte [edx + 1]
add eax, edx
mov eax, dword [eax + 6]
mov edx, dword [eax]
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 8]
mov ecx, dword [esp + 0x2c]
mov ecx, dword [ecx + 8]
movzx ecx, byte [ecx + 1]
add eax, ecx
mov eax, dword [eax + 2]
mov ecx, dword [esp]
imul eax, dword [ecx + 0xc]
lea eax, [esi + eax]
mov ecx, ebp
call fcn.0040b750
mov eax, dword [esp]
add dword [eax + 4], ebx
jmp 0x511458
mov eax, dword [esp]
cmp dword [eax + 4], 0
jle 0x511458
mov eax, dword [esp]
cmp dword [eax + 0xc], 0
jle 0x511445
mov eax, dword [esp]
add eax, 8
mov dword [esp + 0x34], eax
mov eax, dword [esp]
add eax, 8
mov dword [esp + 0x38], eax
mov eax, dword [esp]
add eax, 8
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x3c]
mov eax, dword [eax + 8]
mov edx, dword [esp + 0x3c]
mov edx, dword [edx + 8]
movzx edx, byte [edx + 1]
add eax, edx
mov eax, dword [eax + 2]
push eax
mov eax, dword [esp + 4]
mov eax, dword [eax + 0xc]
push eax
mov eax, dword [esp + 0x40]
mov eax, dword [eax + 8]
mov edx, dword [esp + 0x40]
mov edx, dword [edx + 8]
movzx edx, byte [edx + 1]
add eax, edx
mov eax, dword [eax + 6]
mov ecx, dword [eax]
mov eax, dword [esp + 0x3c]
mov eax, dword [eax + 8]
mov edx, dword [esp + 0x3c]
mov edx, dword [edx + 8]
movzx edx, byte [edx + 1]
add eax, edx
mov eax, dword [eax + 2]
mov edx, dword [esp + 8]
imul dword [edx + 4]
lea edx, [esi + eax]
mov eax, esi
call fcn.0050c4f8
mov eax, dword [esp]
add eax, 8
mov dword [esp + 0x40], eax
mov eax, dword [esp]
add eax, 8
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x44]
mov eax, dword [eax + 8]
mov edx, dword [esp + 0x44]
mov edx, dword [edx + 8]
movzx edx, byte [edx + 1]
add eax, edx
mov eax, dword [eax + 6]
mov edx, dword [eax]
mov eax, dword [esp + 0x40]
mov eax, dword [eax + 8]
mov ecx, dword [esp + 0x40]
mov ecx, dword [ecx + 8]
movzx ecx, byte [ecx + 1]
add eax, ecx
mov eax, dword [eax + 2]
mov ecx, dword [esp]
imul eax, dword [ecx + 0xc]
lea eax, [esi + eax]
mov ecx, dword [esp]
mov ecx, dword [ecx + 4]
call fcn.0040c670
mov eax, dword [esp]
add eax, 8
mov dword [esp + 0x48], eax
mov eax, dword [esp]
add eax, 8
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x4c]
mov eax, dword [eax + 8]
mov edx, dword [esp + 0x4c]
mov edx, dword [edx + 8]
movzx edx, byte [edx + 1]
add eax, edx
mov eax, dword [eax + 6]
mov edx, dword [eax]
mov eax, dword [esp + 0x48]
mov eax, dword [eax + 8]
mov ecx, dword [esp + 0x48]
mov ecx, dword [ecx + 8]
movzx ecx, byte [ecx + 1]
add eax, ecx
mov eax, dword [eax + 2]
mov ecx, dword [esp]
imul eax, dword [ecx + 0xc]
lea eax, [esi + eax]
mov ecx, dword [esp]
mov ecx, dword [ecx + 4]
call fcn.0040b750
mov eax, dword [esp]
mov eax, dword [eax + 4]
mov edx, dword [esp]
sub dword [edx], eax
mov eax, dword [esp]
xor edx, edx
mov dword [eax + 4], edx
test ebx, ebx
jge 0x511493
mov eax, dword [esp]
add eax, 8
mov edx, edi
call fcn.00510810
test edi, edi
jne 0x511476
mov eax, dword [esp]
xor edx, edx
mov dword [eax], edx
jmp 0x511493
mov eax, dword [esp]
mov eax, dword [eax + 8]
mov ebx, eax
test ebx, ebx
je 0x511487
sub ebx, 4
mov ebx, dword [ebx]
mov eax, dword [esp]
push eax
mov eax, dword [eax]
cdq
idiv ebx
pop eax
mov dword [eax], edx
add esp, 0x50
pop ebp
pop edi
pop esi
pop ebx
ret