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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x54
mov eax, dword [esp + 0x9c]
mov edi, dword [ecx + 0x48]
mov esi, dword [edi + 4]
mov dword [esp + 0x50], esi
test eax, eax
je 0x406b0e
cmp dword [edi + 0x34], 0
jne 0x406b0e
mov dword [ecx + 0x1c], 3
jmp 0x40702f
mov dword [esp + 0x4c], edx
mov dword [esp], edi
movzx edx, word [esp + 0x70]
movzx ebx, word [esp + 0x68]
movzx edi, dx
movzx ebp, word [esp + 0x78]
mov edx, edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], ebx
lea edx, [edi + ebx]
add edx, ebp
mov edi, dword [esp + 0xa8]
xor ebx, ebx
add edx, edi
setb bl
add edx, esi
adc ebx, 0
cmp edx, 0xffffffd1
sbb ebx, 0
jb 0x406b5d
mov dword [ecx + 0x1c], 0xf
jmp 0x40702f
mov dword [esp + 0x3c], ebp
mov dword [esp + 8], esi
mov dword [esp + 4], ecx
mov esi, dword [esp + 0x88]
mov ebp, dword [esp + 0x80]
mov dword [esp + 0x12], 0
mov dword [esp + 0x16], 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 + 0x1a], 0
mov dword [esp + 0xe], 0x2014b50
mov edx, dword [esp + 0x8c]
movzx ecx, word [esp + 0x70]
add ecx, edi
mov dword [esp + 0x48], ecx
xor ebx, ebx
mov ecx, 0
cmp word [esp + 0x90], 0
je 0x406bec
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
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 + 0xa0]
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 + 0x98]
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 ebp, dword [esp + 8]
lea esi, [ebp + 0x2e]
mov ecx, dword [esp]
mov eax, dword [ecx + 8]
cmp eax, esi
mov edi, dword [esp + 0x4c]
jae 0x406d32
cmp eax, 1
adc eax, 0
nop
nop
nop
nop
nop
nop
nop
nop
mov ebx, eax
add eax, eax
cmp ebx, esi
jb 0x406d00
push ebx
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 0x406ffc
mov dword [ecx], eax
mov dword [ecx + 8], ebx
mov ebp, dword [esp + 8]
jmp 0x406d34
mov eax, dword [ecx]
mov dword [ecx + 4], esi
mov ecx, dword [ecx + 0xc]
mov esi, ebp
not esi
and esi, ecx
mov edx, ecx
not edx
and edx, ebp
imul edx, esi
mov esi, ecx
and esi, ebp
imul ebx, ecx, 0x2e
or ecx, ebp
imul ecx, esi
add ecx, eax
add ecx, edx
lea eax, [esp + 0xe]
push ebx
push eax
push ecx
call fcn.004090c0
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 0x406dbc
cmp ebp, 1
adc ebp, 0
mov eax, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ebp, eax
add eax, eax
cmp ebp, ebx
jb 0x406d90
push ebp
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 0x406ffc
mov dword [ecx], eax
mov dword [ecx + 8], ebp
mov dword [ecx + 4], ebx
cmp word [esp + 0x68], 0
je 0x406e05
mov eax, dword [ecx + 0xc]
mov edx, esi
not edx
and edx, eax
mov ecx, eax
not ecx
and ecx, esi
imul ecx, edx
mov edx, eax
and edx, esi
or esi, eax
imul esi, edx
mov edx, dword [esp]
add esi, dword [edx]
add esi, ecx
mov ecx, dword [esp + 0x44]
imul ecx, eax
push ecx
push edi
push esi
call fcn.004090c0
mov ecx, dword [esp + 0xc]
add esp, 0xc
mov ebx, dword [ecx + 4]
mov ebp, dword [ecx + 8]
mov eax, dword [esp + 0x40]
lea edi, [ebx + eax]
cmp ebp, edi
jae 0x406e4c
cmp ebp, 1
adc ebp, 0
mov eax, ebp
nop
nop
nop
nop
nop
nop
nop
nop
mov ebp, eax
add eax, eax
cmp ebp, edi
jb 0x406e20
push ebp
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 0x406ffc
mov dword [ecx], eax
mov dword [ecx + 8], ebp
mov dword [ecx + 4], edi
movzx eax, word [esp + 0x70]
test ax, ax
mov esi, dword [esp + 0xa8]
je 0x406ea1
mov eax, dword [ecx + 0xc]
mov edx, ebx
not edx
and edx, eax
mov ecx, eax
not ecx
and ecx, ebx
imul ecx, edx
mov edx, eax
and edx, ebx
or ebx, eax
imul ebx, edx
mov edx, dword [esp]
add ebx, dword [edx]
add ebx, ecx
mov ecx, dword [esp + 0x40]
imul ecx, eax
push ecx
push dword [esp + 0x70]
push ebx
call fcn.004090c0
mov ecx, dword [esp + 0xc]
add esp, 0xc
mov edi, dword [ecx + 4]
mov ebp, dword [ecx + 8]
lea ebx, [edi + esi]
cmp ebp, ebx
jae 0x406ee3
cmp ebp, 1
adc ebp, 0
mov eax, ebp
mov ebp, eax
add eax, eax
cmp ebp, ebx
jb 0x406eb0
push ebp
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 0x406ffc
mov dword [ecx], eax
mov dword [ecx + 8], ebp
mov esi, dword [esp + 0xa8]
mov dword [ecx + 4], ebx
test esi, esi
je 0x406f2a
mov eax, dword [ecx + 0xc]
mov edx, edi
not edx
and edx, eax
mov ecx, eax
not ecx
and ecx, edi
imul ecx, edx
mov edx, eax
and edx, edi
or edi, eax
imul edi, edx
mov edx, dword [esp]
add edi, dword [edx]
add edi, ecx
imul esi, eax
push esi
push dword [esp + 0xa8]
push edi
call fcn.004090c0
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 0x406f53
mov ecx, dword [esp + 4]
mov edx, dword [esp]
push 1
push esi
call fcn.00409000
mov ecx, dword [esp + 8]
add esp, 8
test eax, eax
je 0x406ffc
mov dword [ecx + 4], esi
cmp word [esp + 0x78], 0
je 0x406f99
mov eax, dword [ecx + 0xc]
mov edx, ebx
not edx
and edx, eax
mov ecx, eax
not ecx
and ecx, ebx
imul ecx, edx
mov edx, eax
and edx, ebx
or ebx, eax
imul ebx, edx
mov edx, dword [esp]
add ebx, dword [edx]
add ebx, ecx
mov ecx, dword [esp + 0x3c]
imul ecx, eax
push ecx
push dword [esp + 0x78]
push ebx
call fcn.004090c0
mov ecx, dword [esp + 0xc]
add esp, 0xc
mov esi, dword [ecx + 0x14]
lea edi, [esi + 1]
cmp dword [ecx + 0x18], edi
jae 0x406fc1
mov eax, dword [esp]
lea edx, [eax + 0x10]
mov ecx, dword [esp + 4]
push 1
push edi
call fcn.00409000
mov ecx, dword [esp + 8]
add esp, 8
test eax, eax
je 0x406ffc
mov dword [ecx + 0x14], edi
mov eax, dword [ecx + 0x1c]
mov edi, ecx
mov edx, esi
not edx
and edx, eax
mov ecx, eax
not ecx
and ecx, esi
imul ecx, edx
mov edx, eax
and edx, esi
or esi, eax
imul esi, edx
add esi, dword [edi + 0x10]
add esi, ecx
lea ecx, [esp + 0x50]
push eax
push ecx
push esi
call fcn.004090c0
add esp, 0xc
mov eax, 1
jmp 0x407031
mov ebx, dword [esp + 8]
cmp dword [ecx + 8], ebx
mov edi, dword [esp + 4]
jae 0x407025
push ebx
push dword [ecx + 0xc]
push dword [ecx]
push dword [edi + 0x34]
mov esi, ecx
call dword [edi + 0x30]
add esp, 0x10
test eax, eax
je 0x407028
mov dword [esi], eax
mov dword [esi + 8], ebx
mov ecx, esi
mov dword [ecx + 4], ebx
mov dword [edi + 0x1c], 0x10
xor eax, eax
add esp, 0x54
pop esi
pop edi
pop ebx
pop ebp
ret