Function at 0x406590
Capabilities:
Enumerate pe sections

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x34
mov edx, dword [esp + 0x48]
mov ebx, dword [esp + 0x4c]
mov edi, dword [ebx]
mov ecx, dword [ebx + 8]
mov esi, dword [ebx + 0xc]
movzx eax, byte [edi + 4]
mov dword [esp + 0x18], ecx
movzx ecx, byte [edi + 0xc]
mov dword [esp + 0x1c], esi
movzx esi, byte [edi + 5]
mov ebp, esi
mov dword [esp + 8], eax
movzx eax, byte [edi + 0xa]
and ebp, 1
mov dword [esp + 0x30], ebp
movzx ebp, byte [edi + 8]
mov ebx, esi
and ebx, 2
mov dword [esp + 0x14], ebx
movzx ebx, byte [edi + 0xd]
and esi, 4
shl ebx, 8
or ebx, ecx
movzx ecx, byte [edi + 9]
mov dword [esp + 0x2c], esi
movzx esi, byte [edi + 0xb]
shl ebx, 8
or ebx, esi
shl ebx, 8
or ebx, eax
mov esi, ebx
shr esi, 0x10
shl ebx, 8
or ebx, ecx
mov eax, ebx
shr eax, 0x18
shl ebx, 8
and esi, 0xffffff00
or eax, esi
movzx esi, byte [edi + 7]
or ebx, ebp
movzx ebp, byte [edi + 6]
mov ecx, ebx
shr ecx, 0x18
shl ebx, 8
shl eax, 8
or ecx, eax
movzx eax, byte [edi + 0xf]
or ebx, esi
mov esi, ebx
shr esi, 0x18
shl ebx, 8
shl ecx, 8
or esi, ecx
movzx ecx, byte [edi + 0x10]
mov dword [esp + 0x28], esi
movzx esi, byte [edi + 0xe]
or ebx, ebp
movzx ebp, byte [edi + 0x11]
shl eax, 8
or esi, eax
movzx eax, byte [edi + 0x12]
shl ecx, 0x10
or esi, ecx
movzx ecx, byte [edi + 0x13]
shl ebp, 0x18
or esi, ebp
movzx ebp, byte [edi + 0x14]
shl ecx, 8
or eax, ecx
movzx ecx, byte [edi + 0x15]
shl ebp, 0x10
or eax, ebp
shl ecx, 0x18
or eax, ecx
mov dword [esp + 0x24], eax
movzx eax, byte [edi + 0x1a]
mov dword [esp + 0x20], eax
test edx, edx
je 0x406ae9
cmp dword [edx], 0
je 0x406ae9
mov ebp, dword [edx + 0x24]
mov eax, dword [edx + 0xc]
test eax, eax
je 0x4066d4
mov ecx, dword [edx + 8]
sub ecx, eax
mov dword [esp + 4], ecx
mov dword [edx + 8], ecx
je 0x4066cd
mov ecx, dword [edx]
mov dword [esp], ebp
add eax, ecx
push dword [esp + 4]
push eax
push ecx
call fcn.0042a9c0
mov edx, dword [esp + 0x54]
add esp, 0xc
mov dword [edx + 0xc], 0
test ebp, ebp
je 0x406746
mov eax, dword [edx + 0x1c]
cmp ebp, eax
je 0x406737
mov dword [esp], ebp
mov ecx, ebp
mov dword [esp + 0xc], ebx
mov ebx, dword [edx + 0x10]
neg ecx
mov dword [esp + 4], ecx
lea ebp, [ebx + ebp*4]
add eax, ecx
shl eax, 2
push eax
push ebp
push ebx
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0xc]
call fcn.0042a9c0
mov edx, dword [esp + 0x54]
mov ecx, dword [edx + 0x14]
mov dword [esp + 0xc], ebp
lea eax, [ecx + ebp*8]
mov ebp, dword [esp + 0x10]
add ebp, dword [edx + 0x1c]
shl ebp, 3
push ebp
push eax
push ecx
mov ebp, dword [esp + 0x18]
call fcn.0042a9c0
mov edx, dword [esp + 0x60]
add esp, 0x18
mov eax, dword [edx + 0x1c]
sub dword [edx + 0x20], ebp
sub eax, ebp
mov dword [edx + 0x1c], eax
mov dword [edx + 0x24], 0
cmp esi, dword [edx + 0x150]
jne 0x406ae9
cmp dword [esp + 8], 0
jle 0x406766
mov eax, 0xffffffff
add esp, 0x34
pop ebx
pop ebp
pop esi
pop edi
ret
mov ebp, dword [esp + 0x20]
mov eax, dword [edx + 0x18]
mov ecx, dword [edx + 0x1c]
lea esi, [ecx + ebp + 1]
cmp eax, esi
jg 0x4067db
mov ecx, ebp
lea eax, [eax + ecx + 1]
lea ebp, [eax*4 + 0x80]
push ebp
push dword [edx + 0x10]
call fcn.0042a404
mov edx, dword [esp + 0x50]
add esp, 8
test eax, eax
je 0x406a47
mov ecx, dword [esp + 0x20]
mov dword [edx + 0x10], eax
mov eax, dword [edx + 0x18]
lea ebp, [eax + ecx + 1]
lea esi, [ebp*8 + 0x100]
push esi
push dword [edx + 0x14]
call fcn.0042a404
mov edx, dword [esp + 0x50]
add esp, 8
test eax, eax
je 0x4069f2
mov ecx, dword [esp + 0x20]
mov dword [edx + 0x14], eax
mov eax, dword [edx + 0x18]
lea ebp, [eax + ecx + 0x21]
mov dword [edx + 0x18], ebp
mov eax, dword [edx + 0x154]
cmp eax, dword [esp + 0x24]
je 0x406845
mov ebp, dword [edx + 0x20]
mov ecx, dword [edx + 0x1c]
cmp ebp, ecx
jge 0x40682d
mov esi, dword [edx + 0x10]
mov dword [esp + 8], esi
mov esi, dword [edx + 8]
mov dword [esp + 4], esi
mov esi, dword [esp + 8]
mov dword [esp], eax
mov dword [esp + 0xc], ebx
mov ebx, dword [esp + 4]
mov dword [esp + 0x10], edi
mov edi, ebp
movzx eax, byte [esi + edi*4]
sub ebx, eax
mov dword [edx + 8], ebx
inc edi
cmp edi, ecx
jl 0x406814
mov eax, dword [esp]
mov ebx, dword [esp + 0xc]
mov edi, dword [esp + 0x10]
mov dword [edx + 0x1c], ebp
cmp eax, 0xffffffff
je 0x406845
mov eax, dword [edx + 0x10]
mov dword [eax + ebp*4], 0x400
inc dword [edx + 0x1c]
inc dword [edx + 0x20]
cmp dword [esp + 0x30], 0
je 0x4068af
mov ecx, dword [edx + 0x1c]
test ecx, ecx
jg 0x4068a2
cmp dword [esp + 0x20], 0
mov dword [esp], 0
jle 0x406a91
mov edx, dword [esp]
mov ecx, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
mov esi, dword [esp + 0x20]
movzx eax, byte [edx + edi + 0x1b]
add ecx, eax
sub ebp, eax
inc edx
cmp eax, 0xff
jl 0x406889
cmp edx, esi
jl 0x406874
mov dword [esp + 0x14], 0
mov dword [esp], edx
mov edx, dword [esp + 0x48]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ebp
jmp 0x4068b6
mov eax, dword [edx + 0x10]
cmp dword [eax + ecx*4 - 4], 0x400
je 0x406853
mov dword [esp], 0
cmp dword [esp + 0x1c], 0
je 0x406925
mov ebp, dword [esp + 0x1c]
mov eax, dword [edx + 4]
mov ecx, dword [edx + 8]
lea esi, [ebp + ecx]
cmp eax, esi
jg 0x406905
mov ecx, ebp
lea eax, [ecx + eax + 0x400]
push eax
push dword [edx]
call fcn.0042a404
mov edx, dword [esp + 0x50]
add esp, 8
test eax, eax
je 0x406a9e
mov ecx, ebp
mov ebp, dword [edx + 4]
lea esi, [ecx + ebp + 0x400]
mov ecx, dword [edx + 8]
mov dword [edx + 4], esi
mov dword [edx], eax
jmp 0x406907
mov eax, dword [edx]
push dword [esp + 0x1c]
add eax, ecx
push dword [esp + 0x1c]
push eax
call fcn.00431660
mov edx, dword [esp + 0x54]
add esp, 0xc
mov eax, dword [esp + 0x1c]
add dword [edx + 8], eax
mov eax, dword [esp + 0x20]
cmp eax, dword [esp]
jle 0x4069ba
mov ecx, dword [esp]
mov esi, dword [edx + 0x1c]
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], edi
mov ebp, 0xffffffff
cmp dword [esp + 0x14], 0
mov eax, dword [esp + 0x10]
movzx eax, byte [ecx + eax + 0x1b]
mov ebx, dword [edx + 0x10]
mov dword [ebx + esi*4], eax
mov ebx, dword [edx + 0x1c]
mov edi, dword [edx + 0x14]
mov esi, 0xffffffff
mov dword [edi + ebx*8], esi
mov dword [edi + ebx*8 + 4], esi
je 0x406982
mov esi, dword [edx + 0x1c]
mov ebx, dword [edx + 0x10]
or dword [ebx + esi*4], 0x100
mov dword [esp + 0x14], 0
mov esi, dword [edx + 0x1c]
cmp eax, 0xff
jge 0x40698e
mov ebp, esi
inc esi
mov dword [edx + 0x1c], esi
inc ecx
cmp eax, 0xff
jge 0x40699d
mov dword [edx + 0x20], esi
cmp ecx, dword [esp + 0x20]
jl 0x406945
mov ebx, dword [esp + 0xc]
cmp ebp, 0xffffffff
je 0x4069ba
mov eax, dword [edx + 0x14]
mov dword [eax + ebp*8], ebx
mov ebx, dword [esp + 0x28]
mov dword [eax + ebp*8 + 4], ebx
cmp dword [esp + 0x2c], 0
je 0x4069dd
mov ecx, dword [edx + 0x1c]
mov dword [edx + 0x148], 1
test ecx, ecx
jle 0x4069dd
mov eax, dword [edx + 0x10]
or dword [eax + ecx*4 - 4], 0x200
mov ecx, dword [esp + 0x24]
inc ecx
mov dword [edx + 0x154], ecx
xor eax, eax
add esp, 0x34
pop ebx
pop ebp
pop esi
pop edi
ret
mov eax, dword [edx]
test eax, eax
je 0x406a05
push eax
call fcn.0042a32d
mov edx, dword [esp + 0x4c]
add esp, 4
mov eax, dword [edx + 0x10]
test eax, eax
je 0x406a19
push eax
call fcn.0042a32d
mov edx, dword [esp + 0x4c]
add esp, 4
mov eax, dword [edx + 0x14]
test eax, eax
je 0x406a2d
push eax
call fcn.0042a32d
mov edx, dword [esp + 0x4c]
add esp, 4
push 0x168
push 0
push edx
call fcn.004315f0
mov eax, 0xffffffff
add esp, 0x40
pop ebx
pop ebp
pop esi
pop edi
ret
mov eax, dword [edx]
test eax, eax
je 0x406a5a
push eax
call fcn.0042a32d
mov edx, dword [esp + 0x4c]
add esp, 4
mov eax, dword [edx + 0x10]
test eax, eax
je 0x406a6e
push eax
call fcn.0042a32d
mov edx, dword [esp + 0x4c]
add esp, 4
mov eax, dword [edx + 0x14]
test eax, eax
je 0x406a82
push eax
call fcn.0042a32d
mov edx, dword [esp + 0x4c]
add esp, 4
push 0x168
push 0
push edx
call fcn.004315f0
jmp 0x406a3a
mov dword [esp + 0x14], 0
jmp 0x4068b6
mov eax, dword [edx]
test eax, eax
je 0x406ab1
push eax
call fcn.0042a32d
mov edx, dword [esp + 0x4c]
add esp, 4
mov eax, dword [edx + 0x10]
test eax, eax
je 0x406ac5
push eax
call fcn.0042a32d
mov edx, dword [esp + 0x4c]
add esp, 4
mov eax, dword [edx + 0x14]
test eax, eax
je 0x406ad9
push eax
call fcn.0042a32d
mov edx, dword [esp + 0x4c]
add esp, 4
push 0x168
push 0
push edx
call fcn.004315f0
add esp, 0xc
mov eax, 0xffffffff
add esp, 0x34
pop ebx
pop ebp
pop esi
pop edi
ret