Function at 0x406480
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 ecx, dword [ebp + 0x24]
mov edx, dword [ebp + 0x28]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x44], edx
mov dword [esp + 0x40], ecx
mov eax, dword [ebx]
mov esi, dword [ebx + 4]
mov dword [esp + 0xc], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], esi
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov eax, dword [ebp + 0x20]
mov edi, 6
test eax, eax
js 0x4064cf
mov edi, eax
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], ecx
mov eax, ecx
or eax, edx
je 0x4064eb
mov esi, edi
and esi, 0x400
mov ax, 8
jmp 0x406505
cmp dword [ebp + 0x14], 0
setne al
mov esi, edi
and esi, 0x400
sete cl
and cl, al
movzx eax, cl
shl eax, 3
test edi, 0x10000
mov dword [esp + 0x1c], edx
jne 0x406519
movzx eax, ax
or eax, 0x800
mov dword [esp + 0x84], 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 0x406590
cmp dword [ebx + 0x14], 2
jne 0x406590
cmp dword [ebp + 0x14], 0
sete cl
cmp dword [ebp + 0x10], 0
setne dl
cmp dword [ebp + 0xc], 0
je 0x406590
or dl, cl
je 0x406590
cmp word [ebp + 0x1c], 0
setne cl
cmp dword [ebp + 0x18], 0
sete dl
test dl, cl
jne 0x406590
cmp edi, 0xb
jae 0x406590
mov ecx, dword [esp + 0x10]
cmp dword [ecx + 0x34], 0
mov ecx, dword [ebx + 0x10]
je 0x4065a3
xor ebx, ebx
cmp ecx, 0xffffffff
mov edx, dword [esp + 0x1c]
jne 0x4065c2
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 2
jmp 0x406599
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 edx, dword [esp + 0x1c]
test edx, edx
jne 0x4065b5
mov bl, 1
cmp ecx, 0xffff
jne 0x4065c2
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x34], 1
xor ebx, ebx
mov ecx, dword [esp + 0x18]
or ecx, edx
je 0x4065da
test esi, esi
jne 0x4065da
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
jmp 0x406597
mov ecx, dword [ebp + 0xc]
cmp byte [ecx], 0x2f
je 0x40665e
test esi, esi
je 0x4065f7
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x88], eax
mov byte [esp + 0x2c], 1
jmp 0x40664c
or ah, al
mov byte [esp + 0x18], ah
mov eax, dword [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push 0
call fcn.00404210
add esp, 0xc
mov dword [esp + 0x88], eax
mov dword [esp + 0x1c], 0
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], 0
mov eax, 0
cmp ecx, 4
setb cl
jb 0x40663b
mov eax, edi
or cl, byte [esp + 0x18]
mov byte [esp + 0x2c], cl
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x18], ecx
mov edi, eax
push dword [ebp + 0xc]
call fcn.00409910
add esp, 4
cmp eax, 0x10000
jb 0x40666d
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x406597
mov dword [esp + 0x24], eax
movzx eax, word [ebp + 0x1c]
mov dword [esp + 0x8c], eax
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x20]
mov dword [esp + 4], 0
mov ecx, dword [eax + 0x24]
or ecx, edx
mov eax, 0
je 0x4066b1
mov ecx, edx
xor ecx, 1
mov eax, edx
and eax, 0xfffffffe
add eax, eax
sub eax, ecx
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
and ecx, eax
sub edx, ecx
and edx, eax
mov eax, edx
mov dword [esp + 8], eax
mov eax, dword [esp + 0x10]
mov edx, dword [eax + 4]
xor ecx, ecx
mov eax, dword [esp + 0x8c]
add eax, dword [esp + 0x24]
setb cl
mov dword [esp + 0x80], edx
add eax, edx
adc ecx, 0
mov edx, eax
mov dword [esp + 0x28], eax
add edx, 0x4a
adc ecx, 0
mov eax, 0xfffffffe
cmp eax, edx
sbb dword [esp + 4], ecx
jae 0x406700
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x406597
test bl, bl
je 0x40677d
mov ecx, dword [esp + 0x24]
shr ecx, 0x1f
mov dword [esp + 4], ecx
xor ebx, ebx
mov edx, dword [esp + 0x8c]
add edx, dword [ebp + 0x38]
setb bl
add edx, dword [ebp + 0x40]
adc ebx, 0
mov ecx, dword [esp + 0x24]
add ecx, ecx
add edx, ecx
adc ebx, dword [esp + 4]
add edx, dword [esp + 8]
adc ebx, 0
add edx, dword [esp + 0x80]
adc ebx, 0
mov ecx, dword [ebp + 8]
add edx, dword [ecx]
adc ebx, dword [ecx + 4]
add edx, 0x62
adc ebx, 0
lea ecx, [edx + edx]
and ecx, 0x20
mov dword [esp + 4], 0
add ecx, edx
mov edx, dword [esp + 0x24]
adc ebx, 0
je 0x406789
mov ecx, dword [esp + 0x10]
mov dword [ecx + 0x34], 1
mov dword [esp + 4], 0x1c
jmp 0x406789
mov dword [esp + 4], 0x1c
mov edx, dword [esp + 0x24]
mov dword [esp + 0x80], 0
test edx, edx
je 0x4067cc
mov ecx, dword [ebp + 0xc]
cmp byte [ecx + edx - 1], 0x2f
mov ecx, dword [ebp + 8]
jne 0x4067cf
cmp dword [ebp + 0x14], 0
jne 0x4067c0
mov dword [esp + 0x80], 0x10
mov edx, dword [esp + 0x18]
or edx, dword [esp + 0x1c]
je 0x4067cf
mov dword [ecx + 0x1c], 0x18
jmp 0x406597
mov ecx, dword [ebp + 8]
mov edx, dword [esp + 4]
mov eax, dword [esp + 0x28]
add eax, edx
add eax, 0x2e
mov ebx, dword [esp + 0x10]
cmp dword [ebx + 8], eax
jae 0x4067fd
mov edx, ebx
push 1
push eax
call fcn.00409720
mov ecx, dword [ebp + 8]
add esp, 8
test eax, eax
je 0x406937
mov eax, dword [ebx + 0x14]
inc eax
cmp dword [ebx + 0x18], eax
jae 0x40681f
lea edx, [ebx + 0x10]
push 1
push eax
call fcn.00409720
mov ecx, dword [ebp + 8]
add esp, 8
test eax, eax
je 0x406937
cmp dword [ebp + 0x14], 0
sete dl
xor eax, eax
or dl, byte [esp + 0x2c]
jne 0x40684a
push 0x4df40
push 1
push dword [ecx + 0x34]
mov ebx, ecx
call dword [ecx + 0x28]
mov ecx, ebx
add esp, 0xc
test eax, eax
je 0x406937
mov dword [esp + 4], eax
mov ebx, dword [esp + 0xc]
mov edx, ebx
push dword [esp + 8]
push dword [esp + 0x18]
call fcn.00407000
add esp, 8
test eax, eax
je 0x406943
test esi, esi
setne byte [esp + 0x28]
mov ecx, ebx
mov eax, dword [esp + 8]
add ecx, eax
mov edx, dword [esp + 0x14]
adc edx, 0
mov esi, ebx
and esi, eax
xor ebx, eax
mov eax, esi
shr eax, 0x1f
add esi, esi
add ebx, esi
mov dword [esp + 0xc], ebx
adc eax, dword [esp + 0x14]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x38], ecx
mov ecx, edx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
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 word [esp + 0x7c], 0
movzx ebx, byte [esp + 0x2c]
xor bl, 1
or bl, byte [esp + 0x28]
movzx edx, bl
shl edx, 3
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x10]
cmp dword [edx + 0x34], 0
mov dword [esp + 8], eax
je 0x406958
mov esi, 0xfffffffe
cmp esi, dword [esp + 0x18]
mov edx, 0
sbb edx, dword [esp + 0x1c]
jb 0x40696b
xor edx, edx
cmp esi, dword [esp + 0x14]
sbb edx, ecx
jb 0x40696b
mov dword [esp + 0x10], 0
xor eax, eax
jmp 0x406aa1
mov dword [ecx + 0x1c], 0x10
jmp 0x406597
push dword [esp + 4]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
jmp 0x406597
test eax, eax
je 0x406985
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x406597
xor edx, edx
cmp esi, dword [esp + 0x14]
mov eax, 0
sbb eax, ecx
jb 0x406a5c
xor eax, eax
jmp 0x406a60
mov dword [esp + 0x60], 0x4034b50
test bl, bl
je 0x406993
mov bl, 0x14
mov byte [esp + 0x64], bl
mov ebx, dword [esp + 0x84]
movzx edx, bx
mov byte [esp + 0x66], bl
mov byte [esp + 0x67], dh
mov eax, dword [esp + 0x28]
mov byte [esp + 0x68], al
mov dword [esp + 0x69], 0
mov dword [esp + 0x6d], 0
mov dword [esp + 0x71], 0
mov dword [esp + 0x75], 0
mov byte [esp + 0x79], 0
mov ebx, dword [esp + 0x24]
mov byte [esp + 0x7a], bl
mov byte [esp + 0x7b], bh
mov eax, dword [ebp + 0x38]
mov byte [esp + 0x7c], al
mov byte [esp + 0x7d], ah
lea edx, [esp + 0x60]
push 0x1e
push edx
push ecx
push dword [esp + 0x20]
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x406c2b
mov eax, esi
mov esi, dword [esp + 0xc]
add esi, 0x1e
mov ecx, dword [esp + 8]
adc ecx, 0
push ebx
push dword [ebp + 0xc]
mov dword [esp + 0x10], ecx
push ecx
push esi
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x406c1b
add esi, ebx
mov ebx, dword [esp + 8]
adc ebx, 0
mov dword [esp + 0x10], 0
mov dword [esp + 0x1c], 0
mov eax, dword [ebp + 0x38]
mov ecx, esi
jmp 0x406bad
lea eax, [esp + 0x38]
cmp esi, dword [esp + 0x18]
mov ecx, 0
sbb ecx, dword [esp + 0x1c]
jb 0x406a76
mov esi, 0
jmp 0x406a7a
lea esi, [esp + 0x30]
jae 0x406a80
lea edx, [esp + 0x40]
lea ecx, [esp + 0xa0]
mov dword [esp + 0x10], ecx
push eax
push esi
call fcn.004070a0
add esp, 8
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x1c], eax
mov edx, dword [ebp + 0x38]
add edx, eax
mov dword [esp + 0x60], 0x4034b50
test bl, bl
je 0x406ab8
mov bl, 0x14
mov byte [esp + 0x64], bl
mov byte [esp + 0x65], 0
movzx ebx, word [esp + 0x84]
mov byte [esp + 0x66], bl
mov byte [esp + 0x67], bh
mov eax, dword [esp + 0x28]
mov byte [esp + 0x68], al
mov dword [esp + 0x69], 0
mov dword [esp + 0x6d], 0
mov dword [esp + 0x71], 0
mov dword [esp + 0x75], 0
mov byte [esp + 0x79], 0
mov ebx, dword [esp + 0x24]
mov byte [esp + 0x7a], bl
mov byte [esp + 0x7b], bh
mov byte [esp + 0x7c], dl
mov byte [esp + 0x7d], dh
lea edx, [esp + 0x60]
push 0x1e
push edx
push ecx
push dword [esp + 0x20]
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x406c2b
mov eax, dword [esp + 0xc]
add eax, 0x1e
mov ecx, esi
mov esi, dword [esp + 8]
adc esi, 0
push ebx
push dword [ebp + 0xc]
push esi
mov dword [esp + 0x18], eax
push eax
push dword [ecx + 0x44]
call dword [ecx + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x406c1b
mov ecx, dword [esp + 0xc]
add ecx, ebx
adc esi, 0
cmp dword [esp + 0x10], 0
mov ebx, esi
je 0x406ba2
lea eax, [esp + 0xa0]
mov esi, dword [esp + 0x1c]
push esi
push eax
push ebx
push ecx
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
mov dword [esp + 0x20], ecx
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x406de8
mov ecx, dword [esp + 0xc]
add ecx, esi
adc ebx, 0
jmp 0x406baa
mov dword [esp + 0x10], 0
mov eax, dword [ebp + 0x38]
test eax, eax
mov dword [esp + 0xc], ecx
je 0x406bd5
push eax
push dword [ebp + 0x34]
push ebx
push ecx
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
mov ecx, dword [ebp + 0x38]
add esp, 0x14
cmp eax, ecx
jne 0x406c2b
add dword [esp + 0xc], ecx
adc ebx, 0
mov dword [esp + 8], ebx
cmp byte [esp + 0x2c], 0
je 0x406c37
mov esi, dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [esp + 0x10]
push dword [esp + 0x18]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x406c1b
mov ecx, esi
add dword [esp + 0xc], esi
adc dword [esp + 8], 0
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], 0
jmp 0x406ce8
push dword [esp + 4]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x406597
cmp dword [ebp + 0x14], 0
je 0x406ce8
mov eax, dword [ebp + 8]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 8]
mov dword [esp + 0x54], eax
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
xor eax, eax
cmp edi, 4
setb al
shl eax, 0xe
or eax, dword [edi*4 + 0x43984c]
test edi, edi
jne 0x406c83
or eax, 0x80000
lea ecx, [esp + 0x48]
push eax
push ecx
push 0x407110
mov esi, dword [esp + 0x10]
push esi
call fcn.00405780
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.00404330
add esp, 0x18
cmp eax, 1
jne 0x406e00
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 8], eax
push dword [esp + 4]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov esi, eax
mov dword [esp + 0x18], ecx
or eax, ecx
je 0x406df7
mov dword [esp + 0x48], 0x8074b50
mov ecx, dword [esp + 0x88]
mov byte [esp + 0x4c], cl
mov byte [esp + 0x4d], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x4e], al
mov eax, ecx
shr eax, 0x18
mov byte [esp + 0x4f], al
mov ebx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
cmp dword [esp + 0x10], 0
je 0x406e1c
mov byte [esp + 0x50], bl
mov byte [esp + 0x51], bh
mov eax, ebx
shr eax, 0x10
mov byte [esp + 0x52], al
mov eax, ecx
shr eax, 0x10
shr ebx, 0x18
mov byte [esp + 0x53], bl
mov ebx, ecx
shr ebx, 0x18
mov byte [esp + 0x54], cl
mov byte [esp + 0x55], ch
mov byte [esp + 0x56], al
mov byte [esp + 0x57], bl
mov ecx, esi
mov byte [esp + 0x58], cl
mov byte [esp + 0x59], ch
mov eax, esi
shr eax, 0x10
mov byte [esp + 0x5a], al
mov eax, esi
shr eax, 0x18
mov byte [esp + 0x5b], al
mov dword [esp + 4], 0x38
mov dword [esp + 0x94], 0x30
mov ecx, 0x28
mov dword [esp + 0x14], 0x18
mov dword [esp + 0x2c], 0x17
mov eax, dword [esp + 0x18]
mov byte [esp + 0x23], al
mov dword [esp + 0x98], 0x16
mov dword [esp + 0x90], 0x15
mov edi, 0x14
jmp 0x406e71
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x13
jmp 0x406597
xor eax, eax
xor ecx, ecx
jmp 0x406f14
push dword [esp + 4]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0xc
jmp 0x406597
test ecx, ecx
jne 0x40695c
mov dword [esp + 0x50], ebx
mov dword [esp + 4], 0x18
mov dword [esp + 0x94], 0x10
mov ecx, 8
mov dword [esp + 0x2c], 0xf
mov dword [esp + 0x98], 0xe
mov eax, esi
mov byte [esp + 0x23], al
mov dword [esp + 0x90], 0xd
mov edi, 0xc
mov dword [esp + 0x14], 0x10
mov ebx, esi
mov eax, dword [esp + 0x18]
shrd ebx, eax, cl
shr eax, cl
movzx edx, byte [esp + 0x23]
mov byte [esp + edi + 0x48], dl
test cl, 0x20
jne 0x406e8c
mov eax, ebx
mov ebx, esi
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 0x18]
shrd ebx, edx, cl
mov edi, dword [esp + 0x90]
mov byte [esp + edi + 0x48], al
mov eax, edx
shr eax, cl
test cl, 0x20
jne 0x406eb2
mov eax, ebx
mov ecx, dword [esp + 4]
mov edx, dword [esp + 0x18]
shrd esi, edx, cl
mov edi, dword [esp + 0x98]
mov byte [esp + edi + 0x48], al
shr edx, cl
test cl, 0x20
jne 0x406ed1
mov edx, esi
mov eax, dword [esp + 0x2c]
mov byte [esp + eax + 0x48], dl
lea eax, [esp + 0x48]
mov esi, dword [esp + 0x14]
push esi
push eax
push dword [esp + 0x10]
push dword [esp + 0x18]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x406597
mov eax, dword [esp + 0x14]
add dword [esp + 0xc], eax
adc dword [esp + 8], 0
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
cmp dword [esp + 0x10], 0
je 0x406f77
xor edx, edx
mov esi, 0xfffffffe
cmp esi, dword [esp + 0x38]
mov esi, 0
sbb esi, dword [esp + 0x3c]
jb 0x406f35
xor ebx, ebx
jmp 0x406f39
lea ebx, [esp + 0x38]
mov esi, 0xfffffffe
cmp esi, eax
mov eax, 0
sbb eax, ecx
jb 0x406f50
mov eax, 0
jmp 0x406f54
lea eax, [esp + 0x30]
jae 0x406f5a
lea edx, [esp + 0x40]
lea ecx, [esp + 0xa0]
push ebx
push eax
call fcn.004070a0
add esp, 8
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
movzx ebx, word [esp + 0x84]
movzx edi, word [esp + 0x28]
movzx edx, word [esp + 0x1c]
movzx esi, word [esp + 0x24]
push dword [ebp + 0x40]
push dword [ebp + 0x3c]
push dword [esp + 0x88]
push dword [esp + 0x48]
push dword [esp + 0x48]
push 0
push 0
push ebx
push edi
push dword [esp + 0xac]
push dword [esp + 0x5c]
push dword [esp + 0x5c]
push ecx
push eax
push dword [esp + 0xc4]
push dword [ebp + 0x18]
push edx
push dword [esp + 0x54]
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00407180
add esp, 0x54
test eax, eax
je 0x406597
mov eax, dword [ebp + 8]
inc dword [eax + 0x10]
mov ecx, dword [esp + 0xc]
mov dword [eax], ecx
mov ecx, dword [esp + 8]
mov dword [eax + 4], ecx
mov ebx, 1
jmp 0x406599