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 ebx, dword [edi + 4]
mov dword [esp + 0x50], ebx
test eax, eax
je 0x406b0e
cmp dword [edi + 0x34], 0
jne 0x406b0e
mov dword [ecx + 0x1c], 3
jmp 0x406f71
mov dword [esp + 0x4c], eax
mov dword [esp + 0x48], edx
movzx edx, word [esp + 0x70]
movzx eax, word [esp + 0x68]
movzx edx, dx
movzx ebp, word [esp + 0x78]
mov dword [esp + 0x3c], edx
mov esi, eax
mov dword [esp + 0x40], eax
lea esi, [eax + edx]
add esi, ebp
mov eax, dword [esp + 0xa8]
xor edx, edx
add esi, eax
setb dl
add esi, ebx
adc edx, 0
add esi, 0x2e
adc edx, 0
cmp esi, 0xffffffff
sbb edx, 0
jb 0x406b64
mov dword [ecx + 0x1c], 0xf
jmp 0x406f71
mov dword [esp + 0x38], ebp
mov dword [esp + 4], ebx
mov dword [esp], ecx
mov esi, dword [esp + 0x88]
mov ebp, dword [esp + 0x80]
mov dword [esp + 0xe], 0
mov dword [esp + 0x12], 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 word [esp + 0x2e], 0
mov dword [esp + 0xa], 0x2014b50
mov edx, dword [esp + 0x8c]
mov ecx, eax
movzx eax, word [esp + 0x70]
add eax, ecx
mov dword [esp + 0x44], eax
xor ebx, ebx
mov ecx, 0
cmp word [esp + 0x90], 0
je 0x406bec
mov cl, 0x14
mov byte [esp + 0x10], cl
movzx eax, word [esp + 0x94]
mov byte [esp + 0x12], al
mov byte [esp + 0x13], ah
movzx eax, word [esp + 0x90]
mov byte [esp + 0x14], al
mov byte [esp + 0x15], ah
mov dword [esp + 0x16], 0
mov byte [esp + 0x1a], dl
mov byte [esp + 0x1b], dh
mov ecx, edx
shr ecx, 0x10
mov byte [esp + 0x1c], cl
shr edx, 0x18
neg esi
mov ecx, 0
sbb ecx, ecx
mov byte [esp + 0x1d], dl
or ecx, dword [esp + 0x84]
mov byte [esp + 0x1e], cl
mov byte [esp + 0x1f], ch
mov edx, ecx
shr edx, 0x10
mov byte [esp + 0x20], dl
shr ecx, 0x18
neg ebp
mov edx, 0
sbb edx, edx
mov byte [esp + 0x21], cl
or edx, dword [esp + 0x7c]
mov byte [esp + 0x22], dl
mov byte [esp + 0x23], dh
mov ecx, edx
shr ecx, 0x10
mov byte [esp + 0x24], cl
shr edx, 0x18
mov byte [esp + 0x25], dl
movzx eax, word [esp + 0x68]
mov byte [esp + 0x26], al
mov byte [esp + 0x27], ah
mov eax, dword [esp + 0x44]
mov byte [esp + 0x28], al
mov byte [esp + 0x29], ah
movzx ecx, word [esp + 0x78]
mov byte [esp + 0x2a], cl
mov byte [esp + 0x2b], ch
mov eax, dword [esp + 0xa0]
mov byte [esp + 0x30], al
mov byte [esp + 0x31], ah
mov ecx, eax
shr ecx, 0x10
mov byte [esp + 0x32], cl
shr eax, 0x18
neg dword [esp + 0x4c]
sbb ebx, ebx
mov byte [esp + 0x33], al
or ebx, dword [esp + 0x98]
mov byte [esp + 0x34], bl
mov byte [esp + 0x35], bh
mov eax, ebx
shr eax, 0x10
mov byte [esp + 0x36], al
shr ebx, 0x18
mov byte [esp + 0x37], bl
mov ebx, dword [esp + 4]
lea esi, [ebx + 0x2e]
mov eax, dword [edi + 8]
cmp eax, esi
jae 0x406d2e
cmp eax, 1
adc eax, 0
nop
nop
nop
nop
nop
mov ebx, eax
add eax, eax
cmp ebx, esi
jb 0x406d00
push ebx
push dword [edi + 0xc]
push dword [edi]
mov eax, dword [esp + 0xc]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x406f43
mov dword [edi], eax
mov dword [edi + 8], ebx
mov ebx, dword [esp + 4]
jmp 0x406d30
mov eax, dword [edi]
mov dword [edi + 4], esi
mov ecx, dword [edi + 0xc]
imul edx, ecx, 0x2e
imul ecx, ebx
add ecx, eax
lea eax, [esp + 0xa]
push edx
push eax
push ecx
call fcn.00408ff0
add esp, 0xc
mov esi, dword [edi + 4]
mov ebp, dword [edi + 8]
mov eax, dword [esp + 0x40]
lea ebx, [esi + eax]
cmp ebp, ebx
jae 0x406d98
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 0x406d70
push ebp
push dword [edi + 0xc]
push dword [edi]
mov eax, dword [esp + 0xc]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x406f43
mov dword [edi], eax
mov dword [edi + 8], ebp
movzx ecx, word [esp + 0x70]
mov dword [edi + 4], ebx
cmp word [esp + 0x68], 0
mov eax, dword [esp + 0x48]
je 0x406dd1
mov ecx, dword [edi + 0xc]
imul esi, ecx
add esi, dword [edi]
mov edx, dword [esp + 0x40]
imul edx, ecx
push edx
push eax
push esi
call fcn.00408ff0
movzx ecx, word [esp + 0x7c]
add esp, 0xc
mov ebx, dword [edi + 4]
mov ebp, dword [edi + 8]
mov eax, dword [esp + 0x3c]
lea esi, [ebx + eax]
cmp ebp, esi
jae 0x406e1d
cmp ebp, 1
adc ebp, 0
mov eax, ebp
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ebp, eax
add eax, eax
cmp ebp, esi
jb 0x406df0
push ebp
push dword [edi + 0xc]
push dword [edi]
mov eax, dword [esp + 0xc]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x406f43
mov dword [edi], eax
mov dword [edi + 8], ebp
movzx ecx, word [esp + 0x70]
mov dword [edi + 4], esi
test cx, cx
je 0x406e48
mov eax, dword [edi + 0xc]
imul ebx, eax
add ebx, dword [edi]
mov ecx, dword [esp + 0x3c]
imul ecx, eax
push ecx
push dword [esp + 0x70]
push ebx
call fcn.00408ff0
add esp, 0xc
mov esi, dword [edi + 4]
mov ebp, dword [edi + 8]
mov eax, dword [esp + 0xa8]
lea ebx, [esi + eax]
cmp ebp, ebx
jae 0x406e8f
cmp ebp, 1
adc ebp, 0
mov eax, ebp
nop
nop
mov ebp, eax
add eax, eax
cmp ebp, ebx
jb 0x406e60
push ebp
push dword [edi + 0xc]
push dword [edi]
mov eax, dword [esp + 0xc]
push dword [eax + 0x34]
call dword [eax + 0x30]
add esp, 0x10
test eax, eax
je 0x406f43
mov dword [edi], eax
mov dword [edi + 8], ebp
mov eax, dword [esp + 0xa8]
mov dword [edi + 4], ebx
test eax, eax
je 0x406eba
mov ecx, eax
mov eax, dword [edi + 0xc]
imul esi, eax
add esi, dword [edi]
imul ecx, eax
push ecx
push dword [esp + 0xa8]
push esi
call fcn.00408ff0
add esp, 0xc
mov ebx, dword [edi + 4]
mov ebp, dword [edi + 8]
mov eax, dword [esp + 0x38]
lea esi, [ebx + eax]
cmp ebp, esi
jae 0x406ed9
mov ecx, dword [esp]
mov edx, edi
push 1
push esi
call fcn.00408f30
add esp, 8
test eax, eax
je 0x406f43
mov dword [edi + 4], esi
cmp word [esp + 0x78], 0
je 0x406f01
mov eax, dword [edi + 0xc]
imul ebx, eax
add ebx, dword [edi]
mov ecx, dword [esp + 0x38]
imul ecx, eax
push ecx
push dword [esp + 0x78]
push ebx
call fcn.00408ff0
add esp, 0xc
mov esi, dword [edi + 0x14]
lea ebx, [esi + 1]
cmp dword [edi + 0x18], ebx
jae 0x406f21
lea edx, [edi + 0x10]
mov ecx, dword [esp]
push 1
push ebx
call fcn.00408f30
add esp, 8
test eax, eax
je 0x406f43
mov dword [edi + 0x14], ebx
mov eax, dword [edi + 0x1c]
imul esi, eax
add esi, dword [edi + 0x10]
lea ecx, [esp + 0x50]
push eax
push ecx
push esi
call fcn.00408ff0
add esp, 0xc
mov eax, 1
jmp 0x406f73
mov ebx, dword [esp + 4]
cmp dword [edi + 8], ebx
mov esi, dword [esp]
jae 0x406f67
push ebx
push dword [edi + 0xc]
push dword [edi]
push dword [esi + 0x34]
call dword [esi + 0x30]
add esp, 0x10
test eax, eax
je 0x406f6a
mov dword [edi], eax
mov dword [edi + 8], ebx
mov dword [edi + 4], ebx
mov dword [esi + 0x1c], 0x10
xor eax, eax
add esp, 0x54
pop esi
pop edi
pop ebx
pop ebp
ret