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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x5c
mov eax, dword [esp + 0xac]
mov esi, dword [ecx + 0x48]
mov edi, dword [esi + 4]
mov dword [esp + 0x58], edi
test eax, eax
je 0x40674e
cmp dword [esi + 0x34], 0
jne 0x40674e
mov dword [ecx + 0x1c], 3
jmp 0x406cd0
mov dword [esp + 0x54], eax
mov dword [esp + 0x50], edx
movzx edx, word [esp + 0x70]
movzx eax, word [esp + 0x78]
movzx ebp, word [esp + 0x80]
mov dword [esp + 0x44], edx
add edx, eax
add edx, ebp
xor ebx, ebx
add edx, dword [esp + 0xb8]
setb bl
add edx, edi
adc ebx, 0
cmp edx, 0xffffffd1
sbb ebx, 0
jb 0x406795
mov dword [ecx + 0x1c], 0xf
jmp 0x406cd0
mov dword [esp + 0x40], ebp
mov dword [esp + 0xc], edi
mov dword [esp], ecx
mov dword [esp + 8], esi
mov edi, dword [esp + 0x90]
mov ecx, dword [esp + 0x88]
mov dword [esp + 0x48], ecx
mov edx, eax
mov ecx, dword [esp + 0xb8]
and edx, ecx
mov dword [esp + 4], eax
mov esi, eax
xor esi, ecx
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 dword [esp + 0x32], 0
mov word [esp + 0x36], 0
mov dword [esp + 0x12], 0x2014b50
movzx eax, word [esp + 0x9c]
movzx ebp, word [esp + 0x98]
mov ebx, dword [esp + 0x94]
lea ecx, [esi + edx*2]
mov dword [esp + 0x4c], ecx
xor edx, edx
mov ecx, 0
mov esi, ebp
test bp, bp
je 0x406846
mov cl, 0x14
mov byte [esp + 0x18], cl
mov byte [esp + 0x1a], al
mov byte [esp + 0x1b], ah
mov ecx, esi
mov byte [esp + 0x1c], cl
mov byte [esp + 0x1d], ch
movzx ecx, word [esp + 0xa0]
mov byte [esp + 0x1e], cl
mov byte [esp + 0x1f], ch
movzx eax, word [esp + 0xa4]
mov byte [esp + 0x20], al
mov byte [esp + 0x21], ah
mov byte [esp + 0x22], bl
mov byte [esp + 0x23], bh
mov ecx, ebx
shr ecx, 0x10
mov byte [esp + 0x24], cl
shr ebx, 0x18
neg edi
mov ecx, 0
sbb ecx, ecx
mov byte [esp + 0x25], bl
or ecx, dword [esp + 0x8c]
mov byte [esp + 0x26], cl
mov byte [esp + 0x27], ch
mov ebx, ecx
shr ebx, 0x10
mov byte [esp + 0x28], bl
shr ecx, 0x18
neg dword [esp + 0x48]
mov ebx, 0
sbb ebx, ebx
mov byte [esp + 0x29], cl
or ebx, dword [esp + 0x84]
mov byte [esp + 0x2a], bl
mov byte [esp + 0x2b], bh
mov ecx, ebx
shr ecx, 0x10
mov byte [esp + 0x2c], cl
shr ebx, 0x18
mov byte [esp + 0x2d], bl
movzx eax, word [esp + 0x70]
mov byte [esp + 0x2e], al
mov byte [esp + 0x2f], ah
mov eax, dword [esp + 0x4c]
mov byte [esp + 0x30], al
mov byte [esp + 0x31], ah
movzx ecx, word [esp + 0x80]
mov byte [esp + 0x32], cl
mov byte [esp + 0x33], ch
mov eax, dword [esp + 0xb0]
mov byte [esp + 0x38], al
mov byte [esp + 0x39], ah
mov ecx, eax
shr ecx, 0x10
mov byte [esp + 0x3a], cl
shr eax, 0x18
neg dword [esp + 0x54]
sbb edx, edx
mov byte [esp + 0x3b], al
or edx, dword [esp + 0xa8]
mov byte [esp + 0x3c], dl
mov byte [esp + 0x3d], dh
mov eax, edx
shr eax, 0x10
mov byte [esp + 0x3e], al
shr edx, 0x18
mov byte [esp + 0x3f], dl
mov ebp, dword [esp + 0xc]
lea esi, [ebp + 0x2e]
mov ebx, dword [esp + 8]
mov ecx, dword [ebx + 8]
cmp ecx, esi
jae 0x4069a2
mov eax, 1
test ecx, ecx
je 0x406970
mov eax, ecx
mov edi, eax
add eax, eax
cmp edi, esi
jb 0x406970
push edi
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
mov ecx, ebx
je 0x406ca0
mov dword [ecx], eax
mov dword [ecx + 8], edi
mov ebx, ecx
mov ebp, dword [esp + 0xc]
jmp 0x4069a4
mov eax, dword [ebx]
mov dword [ebx + 4], esi
mov ecx, dword [ebx + 0xc]
mov esi, ecx
not esi
and esi, ebp
mov edx, ebp
not edx
and edx, ecx
imul edx, esi
mov esi, ecx
and esi, ebp
imul edi, ecx, 0x2e
or ecx, ebp
imul ecx, esi
add ecx, eax
add ecx, edx
lea eax, [esp + 0x12]
push edi
push eax
push ecx
call fcn.00408d30
add esp, 0xc
mov ebp, dword [ebx + 4]
mov edi, dword [ebx + 8]
mov eax, dword [esp + 0x44]
lea esi, [eax + ebp]
cmp edi, esi
jae 0x406a2c
mov eax, 1
test edi, edi
je 0x406a00
mov eax, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, eax
add eax, eax
cmp edi, esi
jb 0x406a00
push edi
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
mov ecx, ebx
je 0x406ca0
mov dword [ecx], eax
mov dword [ecx + 8], edi
mov ebx, ecx
mov eax, dword [esp + 4]
mov dword [ebx + 4], esi
cmp word [esp + 0x70], 0
je 0x406a79
mov eax, dword [ebx + 0xc]
mov ecx, eax
not ecx
and ecx, ebp
mov edx, ebp
not edx
and edx, eax
imul edx, ecx
mov ecx, eax
and ecx, ebp
or ebp, eax
imul ebp, ecx
add ebp, edx
add ebp, dword [ebx]
mov ecx, dword [esp + 0x44]
imul ecx, eax
push ecx
push dword [esp + 0x54]
push ebp
call fcn.00408d30
mov eax, dword [esp + 0x10]
add esp, 0xc
mov esi, dword [ebx + 4]
mov edi, dword [ebx + 8]
lea ebp, [esi + eax]
cmp edi, ebp
mov ecx, dword [esp + 0xb8]
jae 0x406ad3
mov eax, 1
test edi, edi
je 0x406aa0
mov eax, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, eax
add eax, eax
cmp edi, ebp
jb 0x406aa0
push edi
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
mov ecx, ebx
je 0x406ca0
mov dword [ecx], eax
mov dword [ecx + 8], edi
mov ebx, ecx
mov ecx, dword [esp + 0xb8]
movzx eax, word [esp + 0x78]
mov dword [ebx + 4], ebp
test ax, ax
je 0x406b21
mov eax, dword [ebx + 0xc]
mov ecx, eax
not ecx
and ecx, esi
mov edx, esi
not edx
and edx, eax
imul edx, ecx
mov ecx, eax
and ecx, esi
or esi, eax
imul esi, ecx
add esi, edx
add esi, dword [ebx]
mov ecx, dword [esp + 4]
imul ecx, eax
push ecx
push dword [esp + 0x78]
push esi
call fcn.00408d30
mov ecx, dword [esp + 0xc4]
add esp, 0xc
mov ebp, dword [ebx + 4]
mov edi, dword [ebx + 8]
lea esi, [ecx + ebp]
cmp edi, esi
jae 0x406b73
mov eax, 1
test edi, edi
je 0x406b40
mov eax, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, eax
add eax, eax
cmp edi, esi
jb 0x406b40
push edi
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
mov ecx, ebx
je 0x406ca0
mov dword [ecx], eax
mov dword [ecx + 8], edi
mov ebx, ecx
mov ecx, dword [esp + 0xb8]
mov dword [ebx + 4], esi
test ecx, ecx
je 0x406bb5
mov eax, dword [ebx + 0xc]
mov esi, ecx
mov ecx, eax
not ecx
and ecx, ebp
mov edx, ebp
not edx
and edx, eax
imul edx, ecx
mov ecx, eax
and ecx, ebp
or ebp, eax
imul ebp, ecx
add ebp, edx
add ebp, dword [ebx]
imul esi, eax
push esi
push dword [esp + 0xb8]
push ebp
call fcn.00408d30
add esp, 0xc
mov esi, dword [ebx + 4]
mov edi, dword [ebx + 8]
mov ebp, dword [esp + 0x40]
lea ebx, [esi + ebp]
cmp edi, ebx
jae 0x406c03
mov eax, 1
test edi, edi
je 0x406bd0
mov eax, edi
nop
nop
nop
nop
nop
mov edi, eax
add eax, eax
cmp edi, ebx
jb 0x406bd0
push edi
mov ebp, dword [esp + 0xc]
push dword [ebp + 0xc]
push dword [ebp]
mov eax, dword [esp + 0xc]
push dword [eax + 0x34]
call dword [eax + 0x30]
mov ecx, ebp
add esp, 0x10
test eax, eax
je 0x406ca0
mov dword [ecx], eax
mov dword [ecx + 8], edi
mov ebp, dword [esp + 0x40]
mov eax, dword [esp + 8]
mov dword [eax + 4], ebx
mov ebx, eax
cmp word [esp + 0x80], 0
je 0x406c4a
mov eax, dword [ebx + 0xc]
mov ecx, eax
not ecx
and ecx, esi
mov edx, esi
not edx
and edx, eax
imul edx, ecx
mov ecx, eax
and ecx, esi
or esi, eax
imul esi, ecx
add esi, edx
add esi, dword [ebx]
imul ebp, eax
push ebp
push dword [esp + 0x80]
push esi
call fcn.00408d30
add esp, 0xc
mov esi, dword [ebx + 0x14]
mov ecx, dword [ebx + 0x18]
lea edi, [esi + 1]
cmp ecx, edi
jae 0x406cda
mov eax, 1
test ecx, ecx
je 0x406c70
mov eax, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ebx, eax
add eax, eax
cmp ebx, edi
jb 0x406c70
push ebx
mov ebp, dword [esp + 0xc]
push dword [ebp + 0x1c]
push dword [ebp + 0x10]
mov eax, dword [esp + 0xc]
push dword [eax + 0x34]
call dword [eax + 0x30]
mov ecx, ebp
add esp, 0x10
test eax, eax
je 0x406ca0
mov dword [ecx + 0x10], eax
mov dword [ecx + 0x18], ebx
mov ebx, ecx
jmp 0x406cdd
mov ebx, dword [esp + 0xc]
cmp dword [ecx + 8], ebx
mov esi, ecx
mov edi, dword [esp]
jae 0x406cc6
push ebx
push dword [esi + 0xc]
push dword [esi]
push dword [edi + 0x34]
call dword [edi + 0x30]
add esp, 0x10
test eax, eax
je 0x406cc9
mov dword [esi], eax
mov dword [esi + 8], ebx
mov dword [esi + 4], ebx
mov dword [edi + 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]
mov edi, ecx
not edi
and edi, esi
mov edx, esi
not edx
and edx, ecx
imul edx, edi
mov edi, ecx
and edi, esi
or esi, ecx
imul esi, edi
add esi, eax
add esi, edx
lea eax, [esp + 0x58]
push ecx
push eax
push esi
call fcn.00408d30
add esp, 0xc
mov eax, 1
jmp 0x406cd2