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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x5c
mov esi, dword [esp + 0xac]
mov eax, dword [ecx + 0x48]
mov edi, dword [eax + 4]
mov dword [esp + 0x58], edi
test esi, esi
je 0x40674e
cmp dword [eax + 0x34], 0
jne 0x40674e
mov dword [ecx + 0x1c], 3
jmp 0x406c26
mov dword [esp + 0x50], esi
mov dword [esp + 0x4c], edx
mov dword [esp + 0x54], eax
mov dword [esp], ecx
xor ecx, ecx
mov dword [esp + 0x40], edi
add edi, 0x2e
setb cl
movzx esi, word [esp + 0x70]
mov edx, edi
and edx, esi
add edx, edx
mov ebp, edi
mov eax, esi
mov dword [esp + 0x3c], esi
xor ebp, esi
movzx eax, word [esp + 0x78]
movzx ebx, ax
movzx esi, word [esp + 0x80]
mov eax, esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], ebx
add esi, ebx
xor eax, eax
add esi, dword [esp + 0xb8]
setb al
add esi, ebp
adc eax, ecx
add esi, edx
adc eax, 0
cmp esi, 0xffffffff
sbb eax, 0
jb 0x4067c6
mov eax, dword [esp]
mov dword [eax + 0x1c], 0xf
jmp 0x406c26
mov esi, dword [esp + 0x90]
mov eax, dword [esp + 0x88]
mov dword [esp + 0x48], eax
mov dword [esp + 0xa], 0
mov dword [esp + 0xe], 0
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 word [esp + 0x2a], 0
mov dword [esp + 6], 0x2014b50
movzx ebx, word [esp + 0x98]
mov ecx, dword [esp + 0x94]
movzx eax, word [esp + 0x78]
mov edx, dword [esp + 0xb8]
add eax, edx
mov dword [esp + 0x44], eax
xor edx, edx
mov eax, 0
mov ebp, ebx
test bx, bx
je 0x406858
mov al, 0x14
mov byte [esp + 0xc], al
movzx eax, word [esp + 0x9c]
mov byte [esp + 0xe], al
mov byte [esp + 0xf], ah
mov eax, ebp
mov byte [esp + 0x10], al
mov byte [esp + 0x11], ah
movzx eax, word [esp + 0xa0]
mov byte [esp + 0x12], al
mov byte [esp + 0x13], ah
movzx eax, word [esp + 0xa4]
mov byte [esp + 0x14], al
mov byte [esp + 0x15], ah
mov byte [esp + 0x16], cl
mov byte [esp + 0x17], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x18], al
shr ecx, 0x18
mov byte [esp + 0x19], cl
neg esi
mov ecx, 0
sbb ecx, ecx
or ecx, dword [esp + 0x8c]
mov byte [esp + 0x1a], cl
mov byte [esp + 0x1b], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x1c], al
shr ecx, 0x18
mov byte [esp + 0x1d], cl
neg dword [esp + 0x48]
mov ecx, 0
sbb ecx, ecx
or ecx, dword [esp + 0x84]
mov byte [esp + 0x1e], cl
mov byte [esp + 0x1f], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x20], al
shr ecx, 0x18
mov byte [esp + 0x21], cl
movzx eax, word [esp + 0x70]
mov byte [esp + 0x22], al
mov byte [esp + 0x23], ah
mov ebx, dword [esp + 0x44]
mov byte [esp + 0x24], bl
mov byte [esp + 0x25], bh
movzx eax, word [esp + 0x80]
mov byte [esp + 0x26], al
mov byte [esp + 0x27], ah
mov ecx, dword [esp + 0xb0]
mov byte [esp + 0x2c], cl
mov byte [esp + 0x2d], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x2e], al
shr ecx, 0x18
mov byte [esp + 0x2f], cl
neg dword [esp + 0x50]
sbb edx, edx
or edx, dword [esp + 0xa8]
mov byte [esp + 0x30], dl
mov byte [esp + 0x31], dh
mov eax, edx
shr eax, 0x10
mov byte [esp + 0x32], al
shr edx, 0x18
mov byte [esp + 0x33], dl
mov ebx, dword [esp + 0x54]
mov ecx, dword [ebx + 8]
cmp ecx, edi
jae 0x4069ba
mov eax, 1
test ecx, ecx
je 0x406990
mov eax, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, eax
add eax, eax
cmp esi, edi
jb 0x406990
push esi
push dword [ebx + 0xc]
push dword [ebx]
mov eax, dword [esp + 0xc]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x406bf8
mov dword [ebx], eax
mov dword [ebx + 8], esi
jmp 0x4069bc
mov eax, dword [ebx]
mov dword [ebx + 4], edi
mov ecx, dword [ebx + 0xc]
imul edx, ecx, 0x2e
imul ecx, dword [esp + 0x40]
add ecx, eax
lea eax, [esp + 6]
push edx
push eax
push ecx
call fcn.00408d00
add esp, 0xc
mov esi, dword [ebx + 4]
mov ebp, dword [ebx + 8]
mov eax, dword [esp + 0x3c]
lea edi, [esi + eax]
cmp ebp, edi
jae 0x406a28
mov eax, 1
test ebp, ebp
je 0x406a00
mov eax, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ebp, eax
add eax, eax
cmp ebp, edi
jb 0x406a00
push ebp
push dword [ebx + 0xc]
push dword [ebx]
mov eax, dword [esp + 0xc]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x406bf8
mov dword [ebx], eax
mov dword [ebx + 8], ebp
mov dword [ebx + 4], edi
cmp word [esp + 0x70], 0
je 0x406a56
mov eax, dword [ebx + 0xc]
imul esi, eax
add esi, dword [ebx]
mov ecx, dword [esp + 0x3c]
imul ecx, eax
push ecx
push dword [esp + 0x50]
push esi
call fcn.00408d00
add esp, 0xc
mov edi, dword [ebx + 4]
mov ebp, dword [ebx + 8]
mov eax, dword [esp + 0x38]
lea esi, [edi + eax]
cmp ebp, esi
jae 0x406a98
mov eax, 1
test ebp, ebp
je 0x406a70
mov eax, ebp
nop
nop
nop
nop
mov ebp, eax
add eax, eax
cmp ebp, esi
jb 0x406a70
push ebp
push dword [ebx + 0xc]
push dword [ebx]
mov eax, dword [esp + 0xc]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x406bf8
mov dword [ebx], eax
mov dword [ebx + 8], ebp
movzx eax, word [esp + 0x78]
mov dword [ebx + 4], esi
test ax, ax
je 0x406ac8
mov eax, dword [ebx + 0xc]
imul edi, eax
add edi, dword [ebx]
mov ecx, dword [esp + 0x38]
imul ecx, eax
push ecx
push dword [esp + 0x78]
push edi
call fcn.00408d00
add esp, 0xc
mov esi, dword [ebx + 4]
mov ebp, dword [ebx + 8]
mov eax, dword [esp + 0xb8]
lea edi, [esi + eax]
cmp ebp, edi
jae 0x406b18
mov eax, 1
test ebp, ebp
je 0x406af0
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, edi
jb 0x406af0
push ebp
push dword [ebx + 0xc]
push dword [ebx]
mov eax, dword [esp + 0xc]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x406bf8
mov dword [ebx], eax
mov dword [ebx + 8], ebp
mov dword [ebx + 4], edi
mov ecx, dword [esp + 0xb8]
test ecx, ecx
je 0x406b48
mov eax, dword [ebx + 0xc]
imul esi, eax
add esi, dword [ebx]
imul ecx, eax
push ecx
push dword [esp + 0xb8]
push esi
call fcn.00408d00
add esp, 0xc
mov edi, dword [ebx + 4]
mov ebp, dword [ebx + 8]
mov eax, dword [esp + 0x34]
lea esi, [edi + eax]
cmp ebp, esi
jae 0x406b84
mov eax, 1
test ebp, ebp
je 0x406b60
mov eax, ebp
nop
nop
mov ebp, eax
add eax, eax
cmp ebp, esi
jb 0x406b60
push ebp
push dword [ebx + 0xc]
push dword [ebx]
mov eax, dword [esp + 0xc]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x406bf8
mov dword [ebx], eax
mov dword [ebx + 8], ebp
mov dword [ebx + 4], esi
cmp word [esp + 0x80], 0
je 0x406bb2
mov eax, dword [ebx + 0xc]
imul edi, eax
add edi, dword [ebx]
mov ecx, dword [esp + 0x34]
imul ecx, eax
push ecx
push dword [esp + 0x80]
push edi
call fcn.00408d00
add esp, 0xc
mov esi, dword [ebx + 0x14]
mov ecx, dword [ebx + 0x18]
lea edi, [esi + 1]
cmp ecx, edi
jae 0x406c30
mov eax, 1
test ecx, ecx
je 0x406bd0
mov eax, ecx
nop
nop
nop
nop
nop
nop
mov ebp, eax
add eax, eax
cmp ebp, edi
jb 0x406bd0
push ebp
push dword [ebx + 0x1c]
push dword [ebx + 0x10]
mov eax, dword [esp + 0xc]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x406bf8
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x18], ebp
jmp 0x406c33
mov edi, dword [esp + 0x40]
cmp dword [ebx + 8], edi
mov esi, dword [esp]
jae 0x406c1c
push edi
push dword [ebx + 0xc]
push dword [ebx]
push dword [esi + 0x34]
call dword [esi + 0x30]
add esp, 0x10
test eax, eax
je 0x406c1f
mov dword [ebx], eax
mov dword [ebx + 8], edi
mov dword [ebx + 4], edi
mov dword [esi + 0x1c], 0x10
xor eax, eax
add esp, 0x5c
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebx + 0x10]
mov dword [ebx + 0x14], edi
mov ecx, dword [ebx + 0x1c]
imul esi, ecx
add esi, eax
lea eax, [esp + 0x58]
push ecx
push eax
push esi
call fcn.00408d00
add esp, 0xc
mov eax, 1
jmp 0x406c28