Function at 0x406650
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x54
mov eax, dword [esp + 0xa0]
mov edi, dword [ecx + 0x48]
mov esi, dword [edi + 4]
mov dword [esp + 0x50], esi
test eax, eax
je 0x40667e
cmp dword [edi + 0x34], 0
jne 0x40667e
mov dword [ecx + 0x1c], 3
jmp 0x406b5e
mov dword [esp + 0x4c], edx
mov dword [esp + 4], ecx
mov dword [esp], edi
movzx edi, word [esp + 0x70]
movzx ebp, word [esp + 0x68]
movzx ecx, di
movzx ebx, word [esp + 0x78]
mov dword [esp + 0x40], ecx
mov edx, ebp
mov dword [esp + 0x44], ebp
add ecx, ebp
add ecx, ebx
mov ebp, dword [esp + 0xac]
xor edx, edx
add ecx, ebp
setb dl
add ecx, esi
adc edx, 0
add ecx, 0x2e
adc edx, 0
cmp ecx, 0xffffffff
sbb edx, 0
jb 0x4066da
mov eax, dword [esp + 4]
mov dword [eax + 0x1c], 0xf
jmp 0x406b5e
mov dword [esp + 0x3c], ebx
mov dword [esp + 8], esi
mov esi, dword [esp + 0x88]
mov ecx, ebp
mov ebp, dword [esp + 0x80]
mov dword [esp + 0x12], 0
mov dword [esp + 0x16], 0
mov dword [esp + 0x1a], 0
mov dword [esp + 0x1e], 0
mov dword [esp + 0x22], 0
mov dword [esp + 0x26], 0
mov dword [esp + 0x2a], 0
mov dword [esp + 0x2e], 0
mov word [esp + 0x32], 0
mov dword [esp + 0xe], 0x2014b50
mov edx, dword [esp + 0x8c]
add ecx, edi
mov dword [esp + 0x48], ecx
xor ebx, ebx
mov ecx, 0
cmp word [esp + 0x90], 0
je 0x406762
mov cl, 0x14
mov byte [esp + 0x14], cl
movzx ecx, word [esp + 0x94]
mov byte [esp + 0x16], cl
mov byte [esp + 0x17], ch
movzx ecx, word [esp + 0x90]
mov byte [esp + 0x18], cl
mov byte [esp + 0x19], ch
movzx ecx, word [esp + 0x98]
mov byte [esp + 0x1a], cl
mov byte [esp + 0x1b], ch
mov byte [esp + 0x1d], 0
mov byte [esp + 0x1e], dl
mov byte [esp + 0x1f], dh
mov ecx, edx
shr ecx, 0x10
mov byte [esp + 0x20], cl
shr edx, 0x18
neg esi
mov ecx, 0
sbb ecx, ecx
mov byte [esp + 0x21], dl
or ecx, dword [esp + 0x84]
mov byte [esp + 0x22], cl
mov byte [esp + 0x23], ch
mov edx, ecx
shr edx, 0x10
mov byte [esp + 0x24], dl
shr ecx, 0x18
neg ebp
mov edx, 0
sbb edx, edx
mov byte [esp + 0x25], cl
or edx, dword [esp + 0x7c]
mov byte [esp + 0x26], dl
mov byte [esp + 0x27], dh
mov ecx, edx
shr ecx, 0x10
mov byte [esp + 0x28], cl
shr edx, 0x18
mov byte [esp + 0x29], dl
movzx ecx, word [esp + 0x68]
mov byte [esp + 0x2a], cl
mov byte [esp + 0x2b], ch
mov ecx, dword [esp + 0x48]
mov byte [esp + 0x2c], cl
mov byte [esp + 0x2d], ch
movzx ecx, word [esp + 0x78]
mov byte [esp + 0x2e], cl
mov byte [esp + 0x2f], ch
mov edx, dword [esp + 0xa4]
mov byte [esp + 0x34], dl
mov byte [esp + 0x35], dh
mov ecx, edx
shr ecx, 0x10
mov byte [esp + 0x36], cl
shr edx, 0x18
neg eax
sbb ebx, ebx
mov byte [esp + 0x37], dl
or ebx, dword [esp + 0x9c]
mov byte [esp + 0x38], bl
mov byte [esp + 0x39], bh
mov eax, ebx
shr eax, 0x10
mov byte [esp + 0x3a], al
shr ebx, 0x18
mov byte [esp + 0x3b], bl
mov ebx, dword [esp + 8]
lea esi, [ebx + 0x2e]
mov ecx, dword [esp]
mov eax, dword [ecx + 8]
cmp eax, esi
mov edi, dword [esp + 4]
jae 0x4068c2
cmp eax, 1
adc eax, 0
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ebx, eax
add eax, eax
cmp ebx, esi
jb 0x406890
push ebx
push dword [ecx + 0xc]
push dword [ecx]
push dword [edi + 0x34]
call dword [edi + 0x30]
mov ecx, dword [esp + 0x10]
add esp, 0x10
test eax, eax
je 0x406b2b
mov dword [ecx], eax
mov dword [ecx + 8], ebx
mov edi, dword [esp + 4]
mov ebx, dword [esp + 8]
jmp 0x4068c4
mov eax, dword [ecx]
mov dword [ecx + 4], esi
mov ecx, dword [esp]
mov ecx, dword [ecx + 0xc]
imul edx, ecx, 0x2e
imul ecx, ebx
add ecx, eax
lea eax, [esp + 0xe]
push edx
push eax
push ecx
call fcn.00408c40
mov ecx, dword [esp + 0xc]
add esp, 0xc
mov esi, dword [ecx + 4]
mov ebp, dword [ecx + 8]
mov eax, dword [esp + 0x44]
lea ebx, [esi + eax]
cmp ebp, ebx
jae 0x40693c
cmp ebp, 1
adc ebp, 0
mov eax, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ebp, eax
add eax, eax
cmp ebp, ebx
jb 0x406910
push ebp
push dword [ecx + 0xc]
push dword [ecx]
push dword [edi + 0x34]
call dword [edi + 0x30]
mov ecx, dword [esp + 0x10]
add esp, 0x10
test eax, eax
je 0x406b2b
mov dword [ecx], eax
mov dword [ecx + 8], ebp
mov edi, dword [esp + 4]
movzx edx, word [esp + 0x70]
mov dword [ecx + 4], ebx
cmp word [esp + 0x68], 0
mov eax, dword [esp + 0x4c]
je 0x40697f
mov ecx, dword [esp]
mov ecx, dword [ecx + 0xc]
imul esi, ecx
mov edx, dword [esp]
add esi, dword [edx]
mov edx, dword [esp + 0x44]
imul edx, ecx
push edx
push eax
push esi
call fcn.00408c40
movzx edx, word [esp + 0x7c]
mov ecx, dword [esp + 0xc]
add esp, 0xc
mov ebx, dword [ecx + 4]
mov ebp, dword [ecx + 8]
mov eax, dword [esp + 0x40]
lea esi, [ebx + eax]
cmp ebp, esi
jae 0x4069d1
cmp ebp, 1
adc ebp, 0
mov eax, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ebp, eax
add eax, eax
cmp ebp, esi
jb 0x4069a0
push ebp
push dword [ecx + 0xc]
push dword [ecx]
push dword [edi + 0x34]
call dword [edi + 0x30]
mov ecx, dword [esp + 0x10]
add esp, 0x10
test eax, eax
je 0x406b2b
mov dword [ecx], eax
mov dword [ecx + 8], ebp
mov edi, dword [esp + 4]
movzx edx, word [esp + 0x70]
mov dword [ecx + 4], esi
test dx, dx
je 0x406a00
mov eax, dword [ecx + 0xc]
imul ebx, eax
add ebx, dword [ecx]
mov ecx, dword [esp + 0x40]
imul ecx, eax
push ecx
push dword [esp + 0x70]
push ebx
call fcn.00408c40
mov ecx, dword [esp + 0xc]
add esp, 0xc
mov esi, dword [ecx + 4]
mov ebp, dword [ecx + 8]
mov eax, dword [esp + 0xac]
lea ebx, [esi + eax]
cmp ebp, ebx
jae 0x406a48
cmp ebp, 1
adc ebp, 0
mov eax, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ebp, eax
add eax, eax
cmp ebp, ebx
jb 0x406a20
push ebp
push dword [ecx + 0xc]
push dword [ecx]
push dword [edi + 0x34]
call dword [edi + 0x30]
mov ecx, dword [esp + 0x10]
add esp, 0x10
test eax, eax
je 0x406b2b
mov dword [ecx], eax
mov dword [ecx + 8], ebp
mov dword [ecx + 4], ebx
mov edx, dword [esp + 0xac]
test edx, edx
je 0x406a7c
mov eax, dword [ecx + 0xc]
imul esi, eax
add esi, dword [ecx]
imul edx, eax
push edx
push dword [esp + 0xac]
push esi
call fcn.00408c40
mov ecx, dword [esp + 0xc]
add esp, 0xc
mov ebx, dword [ecx + 4]
mov ebp, dword [ecx + 8]
mov eax, dword [esp + 0x3c]
lea esi, [ebx + eax]
cmp ebp, esi
jae 0x406ab8
cmp ebp, 1
adc ebp, 0
nop
nop
nop
mov edi, ebp
add ebp, ebp
cmp edi, esi
jb 0x406a90
push edi
push dword [ecx + 0xc]
push dword [ecx]
mov eax, dword [esp + 0x10]
push dword [eax + 0x34]
call dword [eax + 0x30]
mov ecx, dword [esp + 0x10]
add esp, 0x10
test eax, eax
je 0x406b2b
mov dword [ecx], eax
mov dword [ecx + 8], edi
mov dword [ecx + 4], esi
cmp word [esp + 0x78], 0
je 0x406ae4
mov eax, dword [ecx + 0xc]
imul ebx, eax
add ebx, dword [ecx]
mov ecx, dword [esp + 0x3c]
imul ecx, eax
push ecx
push dword [esp + 0x78]
push ebx
call fcn.00408c40
mov ecx, dword [esp + 0xc]
add esp, 0xc
mov esi, dword [ecx + 0x14]
lea edi, [esi + 1]
cmp dword [ecx + 0x18], edi
jae 0x406b09
lea edx, [ecx + 0x10]
mov ecx, dword [esp + 4]
push 1
push edi
call fcn.00408b80
mov ecx, dword [esp + 8]
add esp, 8
test eax, eax
je 0x406b2b
mov dword [ecx + 0x14], edi
mov eax, dword [ecx + 0x1c]
imul esi, eax
add esi, dword [ecx + 0x10]
lea ecx, [esp + 0x50]
push eax
push ecx
push esi
call fcn.00408c40
add esp, 0xc
mov eax, 1
jmp 0x406b60
mov ebx, dword [esp + 8]
cmp dword [ecx + 8], ebx
mov esi, dword [esp + 4]
jae 0x406b54
push ebx
push dword [ecx + 0xc]
push dword [ecx]
push dword [esi + 0x34]
mov edi, ecx
call dword [esi + 0x30]
add esp, 0x10
test eax, eax
je 0x406b57
mov dword [edi], eax
mov dword [edi + 8], ebx
mov ecx, edi
mov dword [ecx + 4], ebx
mov dword [esi + 0x1c], 0x10
xor eax, eax
add esp, 0x54
pop esi
pop edi
pop ebx
pop ebp
ret