Function at 0x40e700
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1f4
mov eax, dword [0x4d044c]
xor eax, esp
mov dword [esp + 0x1f0], eax
push ebx
push esi
mov esi, ecx
mov ebx, 0xfa
push edi
mov edx, 1
movzx edi, word [esi + 0x22]
mov ecx, dword [esi + edi*4 + 0x28]
movzx eax, word [ecx + 6]
and ax, 1
cmove edx, ebx
movzx ebx, ax
movzx eax, word [ecx + 8]
inc ebx
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0xc]
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], ebx
mov eax, dword [eax + 0x10]
mov edx, dword [eax + 0x10]
movzx eax, word [ecx + 0xa]
mov ecx, edx
sub ax, word [esp + 0x14]
movzx eax, ax
sub ecx, eax
imul eax, ecx, 0x3e8
lea ecx, [edx - 0xc]
xor edx, edx
sub eax, 0x2ee0
div ecx
cmp eax, dword [esp + 0x18]
jb 0x40e795
mov eax, dword [esp + 0x14]
movzx eax, ax
sub eax, 0xc
shr eax, 1
cmp eax, ebx
jae 0x40e99a
cmp word [esi + 0x20], 2
jae 0x40e9b1
mov edi, dword [esi + 0x28]
lea ebx, [esi + 0x28]
mov dword [esp + 0x18], edi
movzx edx, word [edi + 6]
test dl, 0x40
jne 0x40e99a
movzx eax, word [edi + 8]
sub eax, 0xc
mov ecx, eax
shr ecx, 1
cmp eax, 2
jae 0x40e860
mov eax, dword [esi + 0x14]
xor ecx, ecx
mov dword [eax + 0x18], 0xffffffff
mov eax, dword [esi + 0x14]
mov word [eax + 6], cx
mov eax, dword [esi + 0x14]
mov dword [eax + 0xc], ecx
mov ecx, dword [esi + 0xc]
mov edx, dword [edi]
add ecx, 0x14
call fcn.00412310
test eax, eax
jne 0x40ec0b
and dword [esi + 0x24], 0xfffffffe
mov ecx, dword [esi + 0x10]
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0xc]
mov eax, dword [eax + 0x34]
mov edx, dword [eax + ecx*4]
test edx, edx
je 0x40e99a
test byte [esi + 0x24], 4
je 0x40e81f
mov ecx, dword [edx + 8]
jmp 0x40e821
mov ecx, edx
mov ebx, dword [ecx + 0x24]
test bl, 1
je 0x40e843
mov ax, word [ecx + 0x20]
cmp ax, word [esi + 0x20]
jb 0x40e843
cmp dword [ecx + 0x28], edi
jne 0x40e843
xor eax, eax
and ebx, 0xfffffffe
mov dword [ecx + 0x20], eax
mov dword [ecx + 0x24], ebx
mov edx, dword [edx]
test edx, edx
jne 0x40e814
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1f0]
xor ecx, esp
call fcn.004606ac
mov esp, ebp
pop ebp
ret
test dl, 1
je 0x40e99a
cmp ecx, 1
jne 0x40e99a
mov ecx, dword [esi + 0xc]
mov edx, dword [edi]
add ecx, 0x14
call fcn.00412310
test eax, eax
jne 0x40ec0b
movzx eax, word [edi + 0xc]
push 0
push ebx
movzx ecx, word [eax + edi + 2]
movzx eax, word [eax + edi]
shl ecx, 0x10
or ecx, eax
mov eax, dword [esi + 0x14]
mov dword [eax + 0x18], ecx
mov ecx, esi
mov edx, dword [esi + 0x14]
mov edx, dword [edx + 0x18]
call fcn.0040a490
add esp, 8
test eax, eax
jne 0x40ec0b
mov eax, dword [esi + 0x14]
mov ecx, 0xffff
mov edi, 1
mov edx, edi
add word [eax + 6], cx
lea ecx, [esi + 0xaa]
mov eax, dword [esi + 0x14]
dec dword [eax + 8]
mov ax, word [ecx]
mov word [esi + 0xa8], ax
mov eax, dword [esi + 0x14]
cmp dx, word [eax + 6]
jae 0x40e90f
lea edx, [esi + 0x2c]
nop
mov eax, dword [edx + 4]
lea edx, [edx + 4]
mov dword [edx - 4], eax
lea ecx, [ecx + 2]
mov ax, word [ecx]
inc edi
mov word [ecx - 2], ax
mov eax, dword [esi + 0x14]
movzx eax, word [eax + 6]
cmp edi, eax
jl 0x40e8f0
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x10]
mov eax, dword [eax + 0x34]
mov edx, dword [eax + ecx*4]
mov dword [esp + 0x10], edx
test edx, edx
je 0x40e99a
test byte [esi + 0x24], 4
je 0x40e92e
mov ebx, dword [edx + 8]
jmp 0x40e930
mov ebx, edx
cmp ebx, esi
je 0x40e990
test byte [ebx + 0x24], 1
je 0x40e990
mov eax, dword [esp + 0x18]
lea ecx, [ebx + 0x28]
cmp dword [ecx], eax
jne 0x40e990
mov eax, dword [esi + 0x14]
xor edx, edx
xor edi, edi
cmp dx, word [eax + 6]
mov edx, dword [esp + 0x10]
jae 0x40e983
lea edx, [ebx + 0xa8]
nop dword [eax]
mov eax, dword [ecx + 4]
lea ecx, [ecx + 4]
mov dword [ecx - 4], eax
lea edx, [edx + 2]
mov ax, word [edx]
inc edi
mov word [edx - 2], ax
mov eax, dword [esi + 0x14]
movzx eax, word [eax + 6]
cmp edi, eax
jl 0x40e960
mov edx, dword [esp + 0x10]
mov eax, 0xffff
add word [ebx + 0x20], ax
add word [ebx + 0x22], ax
mov edx, dword [edx]
mov dword [esp + 0x10], edx
test edx, edx
jne 0x40e923
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1f0]
xor ecx, esp
call fcn.004606ac
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0x28]
mov ecx, esi
call fcn.0040e680
cmp word [esi + edi*2 + 0xa6], 0
mov edx, dword [esi + edi*4 + 0x24]
mov dword [esp + 0x30], 0
movzx eax, word [esi + edi*2 + 0xa8]
mov ecx, eax
mov dword [esp + 0x14], eax
movzx eax, word [esp + edi*2 + 0xce]
mov dword [esp + 0x24], ecx
push 0
jne 0x40ea5f
inc eax
mov word [esp + edi*2 + 0xd2], ax
movzx eax, ax
movzx ecx, word [edx + eax*2 + 0xc]
movzx eax, word [esp + 0x4e]
add ecx, edx
lea edx, [esp + 0x54]
lea eax, [edx + eax*4]
movzx edx, word [ecx + 2]
push eax
movzx eax, word [ecx]
mov ecx, esi
shl edx, 0x10
or edx, eax
call fcn.0040a490
add esp, 8
test eax, eax
jne 0x40ec0b
movzx eax, word [esp + 0x4a]
xor ecx, ecx
mov dword [esp + 0x10], 0
mov word [esp + eax*2 + 0xd0], cx
movzx ecx, word [esi + 0x22]
mov eax, dword [esi + ecx*4 + 0x28]
movzx eax, word [eax + 8]
sub eax, 0xc
shr eax, 1
mov word [esi + ecx*2 + 0xa8], ax
jmp 0x40eace
dec eax
mov word [esp + edi*2 + 0xd2], ax
movzx eax, ax
movzx ecx, word [edx + eax*2 + 0xc]
movzx eax, word [esp + 0x4e]
add ecx, edx
lea edx, [esp + 0x54]
lea eax, [edx + eax*4]
movzx edx, word [ecx + 2]
push eax
movzx eax, word [ecx]
mov ecx, esi
shl edx, 0x10
or edx, eax
call fcn.0040a490
add esp, 8
test eax, eax
jne 0x40ec0b
movzx ecx, word [esp + 0x4a]
mov dword [esp + 0x10], 1
mov eax, dword [esp + ecx*4 + 0x50]
movzx eax, word [eax + 8]
sub eax, 0xc
shr eax, 1
dec eax
mov word [esp + ecx*2 + 0xd0], ax
xor ecx, ecx
movzx eax, word [esi + 0x22]
mov word [esi + eax*2 + 0xa8], cx
movzx eax, word [esp + 0x4a]
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + eax*4 + 0x50]
mov eax, dword [esi + 0xc]
movzx edx, word [ecx + 8]
mov eax, dword [eax + 0x10]
mov ebx, edx
mov edi, dword [eax + 0x10]
mov ax, word [ecx + 0xa]
mov ecx, edi
sub ax, dx
xor edx, edx
movzx eax, ax
sub ecx, eax
imul eax, ecx, 0x3e8
lea ecx, [edi - 0xc]
sub eax, 0x2ee0
div ecx
cmp eax, dword [esp + 0x18]
jb 0x40eb4e
lea eax, [ebx - 0xc]
shr eax, 1
cmp eax, dword [esp + 0x20]
jbe 0x40eb4e
mov edi, dword [esp + 0x10]
lea ecx, [esp + 0x28]
push edi
mov edx, esi
call fcn.0040d950
mov ecx, dword [esp + 0x18]
add esp, 4
inc ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x24]
test edi, edi
movzx edx, cx
movzx ecx, ax
cmove edx, ecx
movzx ebx, dx
jmp 0x40ebfb
cmp dword [esp + 0x10], 0
jne 0x40eb6d
mov edx, esi
lea ecx, [esp + 0x28]
call fcn.0040e160
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x10], eax
jmp 0x40ebf7
mov ecx, dword [esp + 0x1c]
lea eax, [ebx - 0xc]
mov ebx, dword [esp + 0x14]
shr eax, 1
add ebx, eax
mov ax, word [esi + ecx*2 + 0xa8]
inc ax
add word [esp + ecx*2 + 0xd0], ax
mov eax, dword [esp + 0x34]
mov ecx, dword [eax + 0x34]
mov eax, dword [esp + 0x38]
lea ecx, [ecx + eax*4]
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x1c], ecx
and eax, 4
je 0x40ebbf
lea edx, [esp + 0x28]
mov dword [esp + 0x134], 1
mov dword [esp + 0x118], edx
test eax, eax
lea edx, [esp + 0x110]
mov eax, dword [ecx]
lea edi, [esp + 0x28]
cmovne edi, edx
lea edx, [esp + 0x28]
mov dword [edi], eax
mov dword [ecx], edi
mov ecx, esi
call fcn.0040e160
mov ecx, dword [esp + 0x1c]
mov edx, esi
mov dword [esp + 0x10], eax
mov eax, dword [edi]
mov dword [ecx], eax
lea ecx, [esp + 0x28]
call fcn.0040e680
and dword [esi + 0x24], 0xfffffffd
movzx eax, word [esi + 0x22]
mov word [esi + eax*2 + 0xa8], bx
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x1fc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004606ac
mov esp, ebp
pop ebp
ret