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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xc0
mov eax, dword [ebp + 0x24]
mov esi, dword [ebp + 0x28]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x4c], esi
mov dword [esp + 0x14], eax
mov dword [esp + 0x48], eax
mov edx, dword [ebx]
mov ecx, dword [ebx + 4]
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov eax, dword [ebp + 0x20]
mov edi, 6
test eax, eax
js 0x40676f
mov edi, eax
mov dword [esp + 4], ecx
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], esi
or eax, esi
je 0x40678d
mov esi, edi
and esi, 0x400
mov ax, 8
jmp 0x4067a7
cmp dword [ebp + 0x14], 0
setne al
mov esi, edi
and esi, 0x400
sete cl
and cl, al
movzx eax, cl
shl eax, 3
mov dword [esp + 0x34], eax
mov eax, edi
or eax, 0x10000
mov ecx, edi
xor ecx, 0xfffeffff
test eax, ecx
mov dword [esp + 8], edx
jne 0x4067d2
mov eax, dword [esp + 0x34]
movzx eax, ax
or eax, 0x800
mov dword [esp + 0x34], eax
and edi, 0xf
sete ah
test esi, esi
setne al
mov ecx, dword [ebx + 0x48]
mov dword [esp + 0x10], ecx
test ecx, ecx
je 0x406a63
cmp dword [ebx + 0x14], 2
jne 0x406a63
cmp dword [ebp + 0x14], 0
sete cl
cmp dword [ebp + 0x10], 0
setne dl
cmp dword [ebp + 0xc], 0
je 0x406a63
or dl, cl
je 0x406a63
cmp word [ebp + 0x1c], 0
setne cl
cmp dword [ebp + 0x18], 0
sete dl
test dl, cl
jne 0x406a63
cmp edi, 0xb
jae 0x406a63
mov edx, dword [esp + 0x10]
cmp dword [edx + 0x34], 0
mov ecx, dword [ebx + 0x10]
je 0x406859
xor ebx, ebx
cmp ecx, 0xffffffff
jne 0x406873
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 2
jmp 0x406a6c
cmp dword [esp + 0x1c], 0
jne 0x40686a
mov bl, 1
cmp ecx, 0xffff
jne 0x406873
mov dword [edx + 0x34], 1
xor ebx, ebx
mov ecx, dword [esp + 0x14]
or ecx, dword [esp + 0x1c]
je 0x406890
test esi, esi
jne 0x406890
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
jmp 0x406a6a
mov ecx, dword [ebp + 0xc]
cmp byte [ecx], 0x2f
je 0x406914
test esi, esi
je 0x4068ad
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x8c], eax
mov byte [esp + 0x30], 1
jmp 0x406902
or ah, al
mov byte [esp + 0x14], ah
mov eax, dword [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push 0
call fcn.004045f0
add esp, 0xc
mov dword [esp + 0x8c], eax
mov dword [esp + 0x1c], 0
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], 0
mov eax, 0
cmp ecx, 4
setb cl
jb 0x4068f1
mov eax, edi
or cl, byte [esp + 0x14]
mov byte [esp + 0x30], cl
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x14], ecx
mov edi, eax
push dword [ebp + 0xc]
call fcn.00409b60
add esp, 4
cmp eax, 0x10000
jb 0x406923
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x406a6a
mov dword [esp + 0x24], eax
movzx eax, word [ebp + 0x1c]
mov dword [esp + 0x90], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x20]
mov dword [esp + 0xc], 0
mov edx, dword [ecx + 0x24]
or edx, eax
mov edx, 0
je 0x406959
lea edx, [eax - 1]
mov ecx, dword [ecx]
and ecx, edx
sub eax, ecx
and eax, edx
mov edx, eax
mov dword [esp + 0x2c], edx
mov eax, dword [esp + 0x10]
mov ecx, dword [eax + 4]
xor edx, edx
mov eax, dword [esp + 0x90]
add eax, dword [esp + 0x24]
setb dl
mov dword [esp + 0x88], ecx
add eax, ecx
adc edx, 0
mov ecx, eax
mov dword [esp + 0x28], eax
add ecx, 0x4a
adc edx, 0
mov eax, 0xfffffffe
cmp eax, ecx
sbb dword [esp + 0xc], edx
jae 0x4069a8
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x406a6a
test bl, bl
je 0x406a20
mov ecx, dword [esp + 0x24]
shr ecx, 0x1f
mov dword [esp + 0x20], ecx
mov dword [esp + 0xc], 0
mov ecx, dword [esp + 0x90]
add ecx, dword [ebp + 0x38]
mov ebx, 0
adc ebx, 0xffffffff
add ecx, dword [ebp + 0x40]
adc ebx, 0
mov edx, dword [esp + 0x24]
add edx, edx
add ecx, edx
adc ebx, dword [esp + 0x20]
add ecx, dword [esp + 0x2c]
adc ebx, 0
add ecx, dword [esp + 0x88]
adc ebx, 0
mov edx, dword [ebp + 8]
add ecx, dword [edx]
adc ebx, dword [edx + 4]
mov edx, dword [esp + 0x24]
add ecx, 0x72
adc ebx, 0
cmp ebx, 0xffffffff
je 0x406a2c
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x34], 1
mov dword [esp + 0xc], 0x1c
jmp 0x406a2c
mov dword [esp + 0xc], 0x1c
mov edx, dword [esp + 0x24]
mov dword [esp + 0x88], 0
test edx, edx
je 0x406a76
mov ecx, dword [ebp + 0xc]
cmp byte [ecx + edx - 1], 0x2f
mov ebx, dword [ebp + 8]
jne 0x406a79
cmp dword [ebp + 0x14], 0
jne 0x406a63
mov dword [esp + 0x88], 0x10
mov ecx, dword [esp + 0x14]
or ecx, dword [esp + 0x1c]
je 0x406a79
mov dword [ebx + 0x1c], 0x18
xor ebx, ebx
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebx, dword [ebp + 8]
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 0x28]
add eax, ecx
add eax, 0x2e
mov ecx, dword [esp + 0x10]
cmp dword [ecx + 8], eax
jae 0x406aac
mov ecx, ebx
mov edx, dword [esp + 0x10]
push 1
push eax
call fcn.004099c0
mov ecx, dword [esp + 0x18]
add esp, 8
test eax, eax
je 0x406bf2
mov eax, dword [ecx + 0x14]
inc eax
cmp dword [ecx + 0x18], eax
jae 0x406ad1
mov ecx, dword [esp + 0x10]
lea edx, [ecx + 0x10]
mov ecx, ebx
push 1
push eax
call fcn.004099c0
add esp, 8
test eax, eax
je 0x406bf2
cmp dword [ebp + 0x14], 0
sete cl
xor eax, eax
or cl, byte [esp + 0x30]
jne 0x406af8
push 0x4df40
push 1
push dword [ebx + 0x34]
call dword [ebx + 0x28]
add esp, 0xc
test eax, eax
je 0x406bf2
mov dword [esp + 0xc], eax
mov ecx, ebx
mov edx, dword [esp + 8]
push dword [esp + 0x2c]
mov ebx, dword [esp + 8]
push ebx
call fcn.004072d0
add esp, 8
test eax, eax
je 0x406bfe
test esi, esi
setne al
mov edx, dword [esp + 8]
add edx, dword [esp + 0x2c]
adc ebx, 0
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], 0
mov word [esp + 0x84], 0
movzx ecx, byte [esp + 0x30]
xor cl, 1
or cl, al
mov byte [esp + 0x28], cl
movzx eax, cl
shl eax, 3
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x34], 0
mov esi, ebx
je 0x406c13
mov dword [esp + 0x10], 0
mov ebx, 0xfffffffe
cmp ebx, dword [esp + 0x14]
mov eax, 0
sbb eax, dword [esp + 0x1c]
mov dword [esp + 8], edx
mov dword [esp + 4], esi
jb 0x406bd8
xor eax, eax
cmp ebx, edx
sbb eax, esi
mov eax, edx
mov ecx, esi
mov dword [esp + 0x20], 0
jae 0x406d57
mov eax, edx
xor edx, edx
cmp ebx, eax
mov eax, 0
sbb eax, esi
jb 0x406d12
xor eax, eax
jmp 0x406d16
mov dword [ebx + 0x1c], 0x10
jmp 0x406a6a
push dword [esp + 0xc]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
jmp 0x406a6a
test esi, esi
je 0x406c26
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x406a6a
mov dword [esp + 0x68], 0x4034b50
movzx eax, byte [esp + 0x28]
test al, al
je 0x406c39
mov al, 0x14
mov byte [esp + 0x6c], al
mov ecx, dword [esp + 0x34]
movzx eax, cx
mov byte [esp + 0x6e], cl
mov byte [esp + 0x6f], ah
mov eax, dword [esp + 0x2c]
mov byte [esp + 0x70], al
mov dword [esp + 0x71], 0
mov dword [esp + 0x75], 0
mov dword [esp + 0x79], 0
mov dword [esp + 0x7d], 0
mov byte [esp + 0x81], 0
mov ebx, dword [esp + 0x24]
mov byte [esp + 0x82], bl
mov byte [esp + 0x83], bh
mov eax, dword [ebp + 0x38]
mov byte [esp + 0x84], al
mov byte [esp + 0x85], ah
lea eax, [esp + 0x68]
push 0x1e
push eax
push esi
push edx
mov dword [esp + 0x14], esi
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
mov dword [esp + 0x1c], edx
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x406e7c
mov eax, dword [esp + 8]
add eax, 0x1e
mov ecx, dword [esp + 4]
adc ecx, 0
push ebx
push dword [ebp + 0xc]
mov dword [esp + 0xc], ecx
push ecx
mov dword [esp + 0x14], eax
push eax
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x406e6f
mov ecx, dword [esp + 8]
add ecx, ebx
adc dword [esp + 4], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x10], 0
jmp 0x406e90
lea eax, [esp + 0x40]
cmp ebx, dword [esp + 0x14]
mov ecx, 0
sbb ecx, dword [esp + 0x1c]
jb 0x406d2c
mov esi, 0
jmp 0x406d30
lea esi, [esp + 0x38]
jae 0x406d36
lea edx, [esp + 0x48]
lea ecx, [esp + 0xa0]
mov dword [esp + 0x20], ecx
push eax
push esi
call fcn.00407370
add esp, 8
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x10]
mov esi, dword [ebp + 0x38]
add edx, esi
mov dword [esp + 0x68], 0x4034b50
movzx ebx, byte [esp + 0x28]
test bl, bl
je 0x406d73
mov bl, 0x14
mov byte [esp + 0x6c], bl
mov byte [esp + 0x6d], 0
movzx ebx, word [esp + 0x34]
mov byte [esp + 0x6e], bl
mov byte [esp + 0x6f], bh
mov ebx, dword [esp + 0x2c]
mov byte [esp + 0x70], bl
mov dword [esp + 0x71], 0
mov dword [esp + 0x75], 0
mov dword [esp + 0x79], 0
mov dword [esp + 0x7d], 0
mov byte [esp + 0x81], 0
mov ebx, dword [esp + 0x24]
mov byte [esp + 0x82], bl
mov byte [esp + 0x83], bh
mov byte [esp + 0x84], dl
mov byte [esp + 0x85], dh
lea edx, [esp + 0x68]
push 0x1e
push edx
push ecx
push eax
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x406e7c
mov ecx, ebx
mov ebx, dword [esp + 8]
lea eax, [ebx + ebx]
and eax, 0x3c
xor ebx, 0x1e
add ebx, eax
mov eax, dword [esp + 4]
adc eax, 0
push ecx
push dword [ebp + 0xc]
mov dword [esp + 0xc], eax
push eax
push ebx
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
mov ecx, dword [esp + 0x24]
cmp eax, ecx
jne 0x406e6f
mov eax, ecx
add ebx, ecx
mov edx, dword [esp + 4]
adc edx, 0
cmp dword [esp + 0x20], 0
mov ecx, ebx
mov dword [esp + 4], edx
je 0x406e88
lea eax, [esp + 0xa0]
mov ebx, dword [esp + 0x10]
push ebx
push eax
push edx
push ecx
push dword [esi + 0x44]
mov dword [esp + 0x1c], ecx
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x406e7c
mov ecx, dword [esp + 8]
add ecx, ebx
adc dword [esp + 4], 0
jmp 0x406e90
push dword [esp + 0xc]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x406a6a
mov dword [esp + 0x20], 0
mov eax, dword [ebp + 0x38]
test eax, eax
mov dword [esp + 8], ecx
je 0x406ec0
push eax
push dword [ebp + 0x34]
mov ebx, dword [esp + 0xc]
push ebx
push ecx
push dword [esi + 0x44]
call dword [esi + 0x3c]
mov ecx, dword [ebp + 0x38]
add esp, 0x14
cmp eax, ecx
jne 0x406e7c
add dword [esp + 8], ecx
adc ebx, 0
mov dword [esp + 4], ebx
cmp byte [esp + 0x30], 0
je 0x406f06
mov esi, dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [esp + 0xc]
push dword [esp + 0x14]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x4070c0
mov ecx, esi
add dword [esp + 8], esi
adc dword [esp + 4], 0
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], 0
jmp 0x406fc3
cmp dword [ebp + 0x14], 0
je 0x406fc3
mov eax, dword [ebp + 8]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 8]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 4]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x64], 0
mov dword [esp + 0x60], 0
mov ecx, dword [edi*4 + 0x44184c]
xor eax, eax
cmp edi, 4
setb al
shl eax, 0xe
or eax, ecx
test edi, edi
jne 0x406f5e
not ecx
or ecx, 0xfff7ffff
add eax, ecx
add eax, 0x80001
lea ecx, [esp + 0x50]
push eax
push ecx
push 0x4073e0
mov esi, dword [esp + 0x18]
push esi
call fcn.00405ae0
add esp, 0x10
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x9c], eax
lea eax, [esp + 0x9c]
push 4
push 0
push 0
push eax
push dword [ebp + 0x10]
push esi
call fcn.004046b0
add esp, 0x18
cmp eax, 1
jne 0x4070d5
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 4], eax
push dword [esp + 0xc]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
mov esi, eax
mov dword [esp + 0x14], ecx
or eax, ecx
je 0x4070cc
mov dword [esp + 0x50], 0x8074b50
mov ecx, dword [esp + 0x8c]
mov byte [esp + 0x54], cl
mov byte [esp + 0x55], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x56], al
mov eax, ecx
shr eax, 0x18
mov byte [esp + 0x57], al
mov ebx, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
cmp dword [esp + 0x20], 0
je 0x4070f1
mov byte [esp + 0x58], bl
mov byte [esp + 0x59], bh
mov eax, ebx
shr eax, 0x10
mov byte [esp + 0x5a], al
mov eax, ecx
shr eax, 0x10
shr ebx, 0x18
mov byte [esp + 0x5b], bl
mov ebx, ecx
shr ebx, 0x18
mov byte [esp + 0x5c], cl
mov byte [esp + 0x5d], ch
mov byte [esp + 0x5e], al
mov byte [esp + 0x5f], bl
mov ecx, esi
mov byte [esp + 0x60], cl
mov byte [esp + 0x61], ch
mov eax, esi
shr eax, 0x10
mov byte [esp + 0x62], al
mov eax, esi
shr eax, 0x18
mov byte [esp + 0x63], al
mov dword [esp + 0xc], 0x38
mov dword [esp + 0x98], 0x30
mov ecx, 0x28
mov dword [esp + 0x1c], 0x18
mov dword [esp + 0x30], 0x17
mov eax, dword [esp + 0x14]
mov byte [esp + 0x1b], al
mov dword [esp + 0x28], 0x16
mov dword [esp + 0x94], 0x15
mov edi, 0x14
jmp 0x407143
push dword [esp + 0xc]
mov esi, dword [ebp + 8]
jmp 0x406e73
xor eax, eax
xor ecx, ecx
jmp 0x4071e3
push dword [esp + 0xc]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0xc
jmp 0x406a6a
test ecx, ecx
jne 0x406c17
mov dword [esp + 0x58], ebx
mov dword [esp + 0xc], 0x18
mov dword [esp + 0x98], 0x10
mov ecx, 8
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x28], 0xe
mov eax, esi
mov byte [esp + 0x1b], al
mov dword [esp + 0x94], 0xd
mov edi, 0xc
mov dword [esp + 0x1c], 0x10
mov ebx, esi
mov eax, dword [esp + 0x14]
shrd ebx, eax, cl
shr eax, cl
movzx edx, byte [esp + 0x1b]
mov byte [esp + edi + 0x50], dl
test cl, 0x20
jne 0x40715e
mov eax, ebx
mov ebx, esi
mov ecx, dword [esp + 0x98]
mov edx, dword [esp + 0x14]
shrd ebx, edx, cl
mov edi, dword [esp + 0x94]
mov byte [esp + edi + 0x50], al
mov eax, edx
shr eax, cl
test cl, 0x20
jne 0x407184
mov eax, ebx
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x14]
shrd esi, edx, cl
mov edi, dword [esp + 0x28]
mov byte [esp + edi + 0x50], al
shr edx, cl
test cl, 0x20
jne 0x4071a0
mov edx, esi
mov eax, dword [esp + 0x30]
mov byte [esp + eax + 0x50], dl
lea eax, [esp + 0x50]
mov esi, dword [esp + 0x1c]
push esi
push eax
push dword [esp + 0xc]
push dword [esp + 0x14]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x406a6a
mov eax, dword [esp + 0x1c]
add dword [esp + 8], eax
adc dword [esp + 4], 0
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
cmp dword [esp + 0x20], 0
je 0x407246
xor edx, edx
mov esi, 0xfffffffe
cmp esi, dword [esp + 0x40]
mov esi, 0
sbb esi, dword [esp + 0x44]
jb 0x407204
xor edi, edi
jmp 0x407208
lea edi, [esp + 0x40]
mov esi, 0xfffffffe
cmp esi, eax
mov eax, 0
sbb eax, ecx
jb 0x40721f
mov eax, 0
jmp 0x407223
lea eax, [esp + 0x38]
jae 0x407229
lea edx, [esp + 0x48]
lea ecx, [esp + 0xa0]
push edi
push eax
call fcn.00407370
add esp, 8
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
movzx ebx, word [esp + 0x34]
movzx esi, word [esp + 0x2c]
movzx edx, word [esp + 0x10]
movzx edi, word [esp + 0x24]
push dword [ebp + 0x40]
push dword [ebp + 0x3c]
push dword [esp + 0x90]
push dword [esp + 0x50]
push dword [esp + 0x50]
push 0
push 0
push ebx
push esi
push dword [esp + 0xb0]
push dword [esp + 0x64]
push dword [esp + 0x64]
push ecx
push eax
push dword [esp + 0xc8]
push dword [ebp + 0x18]
push edx
push dword [esp + 0x64]
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00407430
add esp, 0x54
test eax, eax
je 0x406a6a
mov eax, dword [ebp + 8]
inc dword [eax + 0x10]
mov ecx, dword [esp + 8]
mov dword [eax], ecx
mov ecx, dword [esp + 4]
mov dword [eax + 4], ecx
mov ebx, 1
jmp 0x406a6c