Function at 0x406810
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 ebx, dword [esi + 4]
mov dword [esp + 0x58], ebx
test eax, eax
je 0x40683e
cmp dword [esi + 0x34], 0
jne 0x40683e
mov dword [ecx + 0x1c], 3
jmp 0x406d96
mov dword [esp + 0x54], eax
mov dword [esp + 0x50], edx
movzx edx, word [esp + 0x78]
movzx eax, word [esp + 0x70]
movzx edx, dx
movzx ebp, word [esp + 0x80]
mov dword [esp + 0x40], edx
mov edi, eax
mov dword [esp + 0x44], eax
lea edi, [eax + edx]
add edi, ebp
mov eax, dword [esp + 0xb8]
xor edx, edx
add edi, eax
setb dl
add edi, ebx
adc edx, 0
add edi, 0x2e
adc edx, 0
cmp edi, 0xffffffff
sbb edx, 0
jb 0x406897
mov dword [ecx + 0x1c], 0xf
jmp 0x406d96
mov dword [esp + 0x38], ebp
mov dword [esp + 4], ebx
mov dword [esp], ecx
mov dword [esp + 0x3c], esi
mov edi, dword [esp + 0x90]
mov ecx, dword [esp + 0x88]
mov dword [esp + 0x48], ecx
mov ebx, eax
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 dword [esp + 0x2a], 0
mov word [esp + 0x2e], 0
mov dword [esp + 0xa], 0x2014b50
movzx esi, word [esp + 0x9c]
movzx ebp, word [esp + 0x98]
mov edx, dword [esp + 0x94]
movzx ecx, word [esp + 0x78]
add ecx, eax
mov dword [esp + 0x4c], ecx
xor ecx, ecx
mov ebx, 0
mov eax, ebp
test bp, bp
je 0x40693b
mov bl, 0x14
mov byte [esp + 0x10], bl
mov ebx, esi
mov byte [esp + 0x12], bl
mov byte [esp + 0x13], bh
mov byte [esp + 0x14], al
mov byte [esp + 0x15], ah
movzx eax, word [esp + 0xa0]
mov byte [esp + 0x16], al
mov byte [esp + 0x17], ah
movzx eax, word [esp + 0xa4]
mov byte [esp + 0x18], al
mov byte [esp + 0x19], ah
mov byte [esp + 0x1a], dl
mov byte [esp + 0x1b], dh
mov ebx, edx
shr ebx, 0x10
mov byte [esp + 0x1c], bl
shr edx, 0x18
neg edi
mov ebx, 0
sbb ebx, ebx
mov byte [esp + 0x1d], dl
or ebx, dword [esp + 0x8c]
mov byte [esp + 0x1e], bl
mov byte [esp + 0x1f], bh
mov edx, ebx
shr edx, 0x10
mov byte [esp + 0x20], dl
shr ebx, 0x18
neg dword [esp + 0x48]
mov edx, 0
sbb edx, edx
mov byte [esp + 0x21], bl
or edx, dword [esp + 0x84]
mov byte [esp + 0x22], dl
mov byte [esp + 0x23], dh
mov ebx, edx
shr ebx, 0x10
mov byte [esp + 0x24], bl
shr edx, 0x18
mov byte [esp + 0x25], dl
movzx eax, word [esp + 0x70]
mov byte [esp + 0x26], al
mov byte [esp + 0x27], ah
mov eax, dword [esp + 0x4c]
mov byte [esp + 0x28], al
mov byte [esp + 0x29], ah
movzx edx, word [esp + 0x80]
mov byte [esp + 0x2a], dl
mov byte [esp + 0x2b], dh
mov eax, dword [esp + 0xb0]
mov byte [esp + 0x30], al
mov byte [esp + 0x31], ah
mov edx, eax
shr edx, 0x10
mov byte [esp + 0x32], dl
shr eax, 0x18
neg dword [esp + 0x54]
sbb ecx, ecx
mov byte [esp + 0x33], al
or ecx, dword [esp + 0xa8]
mov byte [esp + 0x34], cl
mov byte [esp + 0x35], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x36], al
shr ecx, 0x18
mov byte [esp + 0x37], cl
mov ebp, dword [esp + 4]
lea esi, [ebp + 0x2e]
mov ebx, dword [esp + 0x3c]
mov ecx, dword [ebx + 8]
cmp ecx, esi
jae 0x406a9e
mov eax, 1
test ecx, ecx
je 0x406a70
mov eax, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, eax
add eax, eax
cmp edi, esi
jb 0x406a70
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
je 0x406d68
mov dword [ebx], eax
mov dword [ebx + 8], edi
mov ebp, dword [esp + 4]
jmp 0x406aa0
mov eax, dword [ebx]
mov dword [ebx + 4], esi
mov edx, dword [ebx + 0xc]
mov ecx, edx
mov esi, edx
mov edi, ebp
not edi
and edi, edx
imul ebx, edx, 0x2e
or edx, ebp
and ecx, ebp
imul ecx, edx
add ecx, eax
not esi
and esi, ebp
imul edi, esi
add edi, ecx
lea eax, [esp + 0xa]
push ebx
mov ebx, dword [esp + 0x40]
push eax
push edi
call fcn.00408e10
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 0x406b28
mov eax, 1
test edi, edi
je 0x406b00
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 0x406b00
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
je 0x406d68
mov dword [ebx], eax
mov dword [ebx + 8], edi
mov dword [ebx + 4], esi
cmp word [esp + 0x70], 0
je 0x406b6d
mov eax, dword [ebx + 0xc]
mov edx, eax
or edx, ebp
mov ecx, eax
and ecx, ebp
imul ecx, edx
mov edx, eax
not edx
and edx, ebp
not ebp
and ebp, eax
imul ebp, edx
add ebp, ecx
add ebp, dword [ebx]
mov ecx, dword [esp + 0x44]
imul ecx, eax
push ecx
push dword [esp + 0x54]
push ebp
call fcn.00408e10
add esp, 0xc
mov esi, dword [ebx + 4]
mov edi, dword [ebx + 8]
mov eax, dword [esp + 0x40]
lea ebp, [esi + eax]
cmp edi, ebp
mov ecx, dword [esp + 0xb8]
jae 0x406bbf
mov eax, 1
test edi, edi
je 0x406b90
mov eax, edi
nop
nop
nop
nop
nop
nop
mov edi, eax
add eax, eax
cmp edi, ebp
jb 0x406b90
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
je 0x406d68
mov dword [ebx], eax
mov dword [ebx + 8], edi
mov ecx, dword [esp + 0xb8]
movzx eax, word [esp + 0x78]
mov dword [ebx + 4], ebp
test ax, ax
je 0x406c0d
mov eax, dword [ebx + 0xc]
mov edx, eax
or edx, esi
mov ecx, eax
and ecx, esi
imul ecx, edx
mov edx, eax
not edx
and edx, esi
not esi
and esi, eax
imul esi, edx
add esi, ecx
add esi, dword [ebx]
mov ecx, dword [esp + 0x40]
imul ecx, eax
push ecx
push dword [esp + 0x78]
push esi
call fcn.00408e10
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 0x406c4f
mov eax, 1
test edi, edi
je 0x406c20
mov eax, edi
nop
mov edi, eax
add eax, eax
cmp edi, esi
jb 0x406c20
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
je 0x406d68
mov dword [ebx], eax
mov dword [ebx + 8], edi
mov ecx, dword [esp + 0xb8]
mov dword [ebx + 4], esi
test ecx, ecx
je 0x406c91
mov eax, dword [ebx + 0xc]
mov edx, eax
or edx, ebp
mov esi, ecx
mov ecx, eax
and ecx, ebp
imul ecx, edx
mov edx, eax
not edx
and edx, ebp
not ebp
and ebp, eax
imul ebp, edx
add ebp, ecx
add ebp, dword [ebx]
imul esi, eax
push esi
push dword [esp + 0xb8]
push ebp
call fcn.00408e10
add esp, 0xc
mov esi, dword [ebx + 4]
mov edi, dword [ebx + 8]
mov eax, dword [esp + 0x38]
lea ebp, [esi + eax]
cmp edi, ebp
jae 0x406cd8
mov eax, 1
test edi, edi
je 0x406cb0
mov eax, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, eax
add eax, eax
cmp edi, ebp
jb 0x406cb0
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
je 0x406d68
mov dword [ebx], eax
mov dword [ebx + 8], edi
mov dword [ebx + 4], ebp
cmp word [esp + 0x80], 0
je 0x406d1d
mov eax, dword [ebx + 0xc]
mov edx, eax
or edx, esi
mov ecx, eax
and ecx, esi
imul ecx, edx
mov edx, eax
not edx
and edx, esi
not esi
and esi, eax
imul esi, edx
add esi, ecx
add esi, dword [ebx]
mov ecx, dword [esp + 0x38]
imul ecx, eax
push ecx
push dword [esp + 0x80]
push esi
call fcn.00408e10
add esp, 0xc
mov esi, dword [ebx + 0x14]
mov ecx, dword [ebx + 0x18]
lea edi, [esi + 1]
cmp ecx, edi
jae 0x406da0
mov eax, 1
test ecx, ecx
je 0x406d40
mov eax, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ebp, eax
add eax, eax
cmp ebp, edi
jb 0x406d40
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 0x406d68
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x18], ebp
jmp 0x406da3
mov edi, dword [esp + 4]
cmp dword [ebx + 8], edi
mov esi, dword [esp]
jae 0x406d8c
push edi
push dword [ebx + 0xc]
push dword [ebx]
push dword [esi + 0x34]
call dword [esi + 0x30]
add esp, 0x10
test eax, eax
je 0x406d8f
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]
mov edi, ecx
or edi, esi
mov edx, ecx
and edx, esi
imul edx, edi
add edx, eax
mov eax, ecx
not eax
and eax, esi
not esi
and esi, ecx
imul esi, eax
add esi, edx
lea eax, [esp + 0x58]
push ecx
push eax
push esi
call fcn.00408e10
add esp, 0xc
mov eax, 1
jmp 0x406d98