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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xc8
mov edi, dword [ebp + 0x24]
mov esi, dword [ebp + 0x28]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], edi
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
mov dword [esp + 8], eax
mov dword [esp + 0x30], eax
mov dword [esp + 4], ecx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov ecx, dword [ebp + 0x20]
mov eax, 6
test ecx, ecx
js 0x406133
mov eax, ecx
mov ecx, edi
or ecx, esi
je 0x406143
mov cx, 8
mov dword [esp + 0x24], ecx
jmp 0x406165
cmp dword [ebp + 0x14], 0
je 0x40615d
mov ecx, eax
xor ecx, 0xfffffbff
mov edx, eax
or edx, 0x400
test edx, ecx
je 0x406139
mov dword [esp + 0x24], 0
mov ecx, eax
xor ecx, 0xfffeffff
mov edx, eax
or edx, 0x10000
test edx, ecx
jne 0x40618a
mov ecx, dword [esp + 0x24]
movzx ecx, cx
or ecx, 0x800
mov dword [esp + 0x24], ecx
mov ecx, eax
and ecx, 0xf
mov dword [esp + 0xc], ecx
sete dh
mov ecx, dword [ebx + 0x48]
mov dword [esp], ecx
test ecx, ecx
je 0x40640a
cmp dword [ebx + 0x14], 2
jne 0x40640a
cmp dword [ebp + 0x14], 0
sete cl
cmp dword [ebp + 0x10], 0
setne dl
cmp dword [ebp + 0xc], 0
je 0x40640a
or dl, cl
je 0x40640a
cmp word [ebp + 0x1c], 0
setne cl
cmp dword [ebp + 0x18], 0
sete dl
test dl, cl
jne 0x40640a
cmp dword [esp + 0xc], 0xb
jae 0x40640a
mov byte [esp + 0x18], dh
mov edx, dword [esp]
cmp dword [edx + 0x34], 0
mov ecx, dword [ebx + 0x10]
je 0x406216
xor ebx, ebx
cmp ecx, 0xffffffff
jne 0x40622d
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 2
jmp 0x406413
test esi, esi
jne 0x406224
mov bl, 1
cmp ecx, 0xffff
jne 0x40622d
mov dword [edx + 0x34], 1
xor ebx, ebx
mov ecx, edi
or ecx, esi
je 0x40624c
mov ecx, eax
and ecx, 0x400
jne 0x40624c
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
jmp 0x406411
mov ecx, dword [ebp + 0xc]
cmp byte [ecx], 0x2f
je 0x4062d1
mov ecx, eax
shr ecx, 0xa
and ecx, 1
test eax, 0x400
mov dword [esp + 0x44], ecx
je 0x406278
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x90], eax
mov byte [esp + 0x20], 1
jmp 0x4062bf
or byte [esp + 0x18], cl
mov edi, dword [ebp + 0x14]
push edi
push dword [ebp + 0x10]
push 0
call fcn.00404000
add esp, 0xc
mov dword [esp + 0x90], eax
xor esi, esi
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], 0
mov eax, 0
cmp edi, 4
setb cl
jb 0x4062b3
mov eax, dword [esp + 0xc]
or cl, byte [esp + 0x18]
mov byte [esp + 0x20], cl
mov dword [esp + 0xc], eax
push dword [ebp + 0xc]
call fcn.00409640
add esp, 4
cmp eax, 0x10000
jb 0x4062e0
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x406411
mov dword [esp + 0x18], eax
movzx eax, word [ebp + 0x1c]
mov dword [esp + 0x8c], eax
mov dword [esp + 0x88], 0
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x20]
mov edx, dword [ecx + 0x24]
or edx, eax
mov edx, 0
je 0x40631e
mov edx, 0xfffffffe
add edx, eax
inc edx
mov ecx, dword [ecx]
and ecx, edx
sub eax, ecx
and eax, edx
mov edx, eax
mov dword [esp + 0x14], edx
mov eax, dword [esp]
mov eax, dword [eax + 4]
xor edx, edx
mov dword [esp + 0x10], eax
add eax, dword [esp + 0x8c]
setb dl
add eax, dword [esp + 0x18]
adc edx, 0
add eax, 0x4a
adc edx, 0
mov ecx, 0xfffffffe
cmp ecx, eax
sbb dword [esp + 0x88], edx
jae 0x406364
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x406411
mov ecx, 0x1c
test bl, bl
je 0x4063d3
mov ecx, dword [esp + 0x18]
shr ecx, 0x1f
xor edx, edx
mov ebx, dword [esp + 0x8c]
add ebx, dword [ebp + 0x38]
setb dl
add ebx, dword [ebp + 0x40]
adc edx, 0
mov eax, dword [esp + 0x18]
add eax, eax
add ebx, eax
adc edx, ecx
add ebx, dword [esp + 0x14]
adc edx, 0
add ebx, dword [esp + 0x10]
adc edx, 0
mov eax, dword [ebp + 8]
add ebx, dword [eax]
adc edx, dword [eax + 4]
add ebx, 0x62
adc edx, 0
lea eax, [ebx + ebx]
and eax, 0x20
xor ecx, ecx
add eax, ebx
adc edx, 0
mov edx, dword [esp + 0x18]
je 0x4063d7
mov eax, dword [esp]
mov dword [eax + 0x34], 1
mov ecx, 0x1c
jmp 0x4063d7
mov edx, dword [esp + 0x18]
mov dword [esp + 0x88], 0
test edx, edx
je 0x40641d
mov eax, dword [ebp + 0xc]
cmp byte [eax + edx - 1], 0x2f
mov ebx, dword [ebp + 8]
jne 0x406420
cmp dword [ebp + 0x14], 0
jne 0x40640a
mov dword [esp + 0x88], 0x10
mov eax, edi
or eax, esi
je 0x406420
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 eax, dword [esp + 0x8c]
add eax, edx
mov edx, dword [esp + 0x10]
add edx, eax
lea eax, [ecx + edx]
add eax, 0x2e
mov ecx, dword [esp]
cmp dword [ecx + 8], eax
jae 0x406459
mov ecx, ebx
mov edx, dword [esp]
push 1
push eax
call fcn.00409460
mov ecx, dword [esp + 8]
add esp, 8
test eax, eax
je 0x4065a4
mov eax, dword [ecx + 0x14]
inc eax
cmp dword [ecx + 0x18], eax
jae 0x40647d
mov ecx, dword [esp]
lea edx, [ecx + 0x10]
mov ecx, ebx
push 1
push eax
call fcn.00409460
add esp, 8
test eax, eax
je 0x4065a4
cmp dword [ebp + 0x14], 0
sete cl
xor eax, eax
or cl, byte [esp + 0x20]
jne 0x4064a4
push 0x4df40
push 1
push dword [ebx + 0x34]
call dword [ebx + 0x28]
add esp, 0xc
test eax, eax
je 0x4065a4
mov dword [esp + 0x10], eax
mov ecx, ebx
mov ebx, dword [esp + 8]
mov edx, ebx
push dword [esp + 0x14]
push dword [esp + 8]
call fcn.00406cb0
add esp, 8
test eax, eax
je 0x4065b0
add ebx, dword [esp + 0x14]
mov ecx, dword [esp + 4]
adc ecx, 0
mov dword [esp + 8], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ecx
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 dword [esp + 0x7c], 0
mov word [esp + 0x80], 0
movzx ebx, byte [esp + 0x20]
xor bl, 1
or bl, byte [esp + 0x44]
movzx eax, bl
shl eax, 3
mov dword [esp + 0x44], eax
mov eax, dword [esp]
cmp dword [eax + 0x34], 0
je 0x4065c5
mov dword [esp + 4], ecx
mov eax, 0xfffffffe
cmp eax, edi
mov eax, 0
sbb eax, esi
jb 0x406583
xor eax, eax
mov ecx, dword [esp + 8]
mov edx, 0xfffffffe
cmp edx, ecx
mov edx, dword [esp + 4]
sbb eax, edx
mov dword [esp], ecx
mov ecx, edx
mov eax, 0
mov dword [esp + 0x14], 0
jae 0x4066f4
xor edx, edx
mov ecx, 0xfffffffe
cmp ecx, dword [esp + 8]
mov eax, 0
sbb eax, dword [esp + 4]
jb 0x4066b4
xor eax, eax
jmp 0x4066b8
mov dword [ebx + 0x1c], 0x10
jmp 0x406411
push dword [esp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
jmp 0x406411
test ecx, ecx
je 0x4065d8
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x406411
mov dword [esp + 0x64], 0x4034b50
test bl, bl
je 0x4065e6
mov bl, 0x14
mov byte [esp + 0x68], bl
mov edx, dword [esp + 0x24]
movzx eax, dx
mov byte [esp + 0x6a], dl
mov byte [esp + 0x6b], ah
mov eax, dword [esp + 0x44]
mov byte [esp + 0x6c], al
mov dword [esp + 0x6d], 0
mov dword [esp + 0x71], 0
mov dword [esp + 0x75], 0
mov dword [esp + 0x79], 0
mov byte [esp + 0x7d], 0
mov ebx, dword [esp + 0x18]
mov byte [esp + 0x7e], bl
mov byte [esp + 0x7f], bh
mov eax, dword [ebp + 0x38]
mov byte [esp + 0x80], al
mov byte [esp + 0x81], ah
lea eax, [esp + 0x64]
push 0x1e
push eax
push ecx
mov edi, dword [esp + 0x14]
push edi
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
mov dword [esp + 0x18], ecx
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x406a62
add edi, 0x1e
mov eax, dword [esp + 4]
adc eax, 0
push ebx
push dword [ebp + 0xc]
mov dword [esp + 0xc], eax
push eax
push edi
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x406a55
add edi, ebx
mov ebx, dword [esp + 4]
adc ebx, 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x84], 0
mov eax, dword [ebp + 0x38]
mov ecx, edi
jmp 0x406804
lea eax, [esp + 0x30]
cmp ecx, edi
mov ecx, 0
sbb ecx, esi
jb 0x4066ca
mov esi, 0
jmp 0x4066ce
lea esi, [esp + 0x28]
jae 0x4066d4
lea edx, [esp + 0x38]
lea ecx, [esp + 0xa8]
mov dword [esp + 0x14], ecx
push eax
push esi
call fcn.00406d50
add esp, 8
mov ecx, dword [esp + 0x30]
mov dword [esp], ecx
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x84], eax
mov edx, dword [ebp + 0x38]
add edx, eax
mov dword [esp + 0x64], 0x4034b50
test bl, bl
je 0x40670e
mov bl, 0x14
mov byte [esp + 0x68], bl
mov byte [esp + 0x69], 0
movzx ebx, word [esp + 0x24]
mov byte [esp + 0x6a], bl
mov byte [esp + 0x6b], bh
mov ebx, dword [esp + 0x44]
mov byte [esp + 0x6c], bl
mov dword [esp + 0x6d], 0
mov dword [esp + 0x71], 0
mov dword [esp + 0x75], 0
mov dword [esp + 0x79], 0
mov byte [esp + 0x7d], 0
mov ebx, dword [esp + 0x18]
mov byte [esp + 0x7e], bl
mov byte [esp + 0x7f], bh
mov byte [esp + 0x80], dl
mov byte [esp + 0x81], dh
lea edx, [esp + 0x64]
push 0x1e
push edx
push ecx
push dword [esp + 0xc]
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x406a62
mov eax, esi
mov esi, dword [esp + 8]
add esi, 0x1e
mov edi, dword [esp + 4]
adc edi, 0
push ebx
push dword [ebp + 0xc]
push edi
push esi
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x406880
add esi, ebx
adc edi, 0
cmp dword [esp + 0x14], 0
mov ebx, edi
mov ecx, esi
je 0x4067f9
lea eax, [esp + 0xa8]
mov edi, dword [esp + 0x84]
push edi
push eax
push ebx
push ecx
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
mov esi, ecx
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, edi
jne 0x406a46
mov ecx, edi
add esi, edi
adc ebx, 0
mov eax, dword [ebp + 0x38]
mov ecx, esi
jmp 0x406804
mov dword [esp + 0x14], 0
mov eax, dword [ebp + 0x38]
test eax, eax
mov dword [esp + 4], ebx
je 0x406839
push eax
push dword [ebp + 0x34]
push ebx
push ecx
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
mov edi, eax
mov ebx, ecx
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, edi
jne 0x406a62
mov eax, edi
add ebx, edi
mov dword [esp + 8], ebx
adc dword [esp + 4], 0
jmp 0x40683d
mov dword [esp + 8], ecx
cmp byte [esp + 0x20], 0
je 0x40688c
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 0x406880
mov eax, dword [ebp + 0x14]
add dword [esp + 8], eax
adc dword [esp + 4], 0
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 0
jmp 0x406941
push dword [esp + 0x10]
mov esi, dword [ebp + 8]
jmp 0x406a59
cmp dword [ebp + 0x14], 0
je 0x406941
mov eax, dword [ebp + 8]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 8]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 4]
mov dword [esp + 0x54], eax
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
xor eax, eax
mov ecx, dword [esp + 0xc]
cmp ecx, 4
setb al
shl eax, 0xe
or eax, dword [ecx*4 + 0x43a84c]
test ecx, ecx
jne 0x4068dc
or eax, 0x80000
lea ecx, [esp + 0x48]
push eax
push ecx
push 0x406dc0
mov esi, dword [esp + 0x1c]
push esi
call fcn.00405490
add esp, 0x10
mov eax, dword [ebp + 0x14]
mov dword [esp + 0xa4], eax
lea eax, [esp + 0xa4]
push 4
push 0
push 0
push eax
push dword [ebp + 0x10]
push esi
call fcn.004040e0
add esp, 0x18
cmp eax, 1
jne 0x406a82
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 4], eax
push dword [esp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0xc], eax
mov dword [esp], ecx
or eax, ecx
je 0x406a6e
mov dword [esp + 0x48], 0x8074b50
mov ecx, dword [esp + 0x90]
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 + 0x28]
mov ecx, dword [esp + 0x2c]
cmp dword [esp + 0x14], 0
je 0x406a9e
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, dword [esp + 0xc]
mov byte [esp + 0x58], cl
mov byte [esp + 0x59], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x5a], al
mov eax, ecx
shr eax, 0x18
mov byte [esp + 0x5b], al
lea eax, [esp + 0x5c]
mov dword [esp + 0x98], eax
mov dword [esp + 0x20], 0x38
mov dword [esp + 0x9c], 0x30
mov ecx, 0x28
mov esi, 0x18
mov eax, dword [esp]
mov byte [esp + 0x1f], al
mov dword [esp + 0x10], 0x17
mov dword [esp + 0xa0], 0x16
mov dword [esp + 0x94], 0x15
jmp 0x406af8
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x13
jmp 0x406411
push dword [esp + 0x10]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x406411
mov dword [esp + 0xc], 0
mov dword [esp], 0
jmp 0x406bb2
push dword [esp + 0x10]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0xc
jmp 0x406411
test ecx, ecx
jne 0x4065c9
mov dword [esp + 0x50], ebx
lea eax, [esp + 0x54]
mov dword [esp + 0x98], eax
mov dword [esp + 0x20], 0x18
mov dword [esp + 0x9c], 0x10
mov ecx, 8
mov dword [esp + 0x10], 0xf
mov eax, dword [esp + 0xc]
mov byte [esp + 0x1f], al
mov dword [esp + 0xa0], 0xe
mov dword [esp + 0x94], 0xd
mov esi, 0x10
mov ebx, dword [esp + 0xc]
mov eax, dword [esp]
shrd ebx, eax, cl
shr eax, cl
mov edi, dword [esp + 0x98]
movzx edx, byte [esp + 0x1f]
mov byte [edi], dl
test cl, 0x20
jne 0x406b19
mov eax, ebx
mov ebx, dword [esp + 0xc]
mov ecx, dword [esp + 0x9c]
mov edx, dword [esp]
shrd ebx, edx, cl
mov edi, dword [esp + 0x94]
mov byte [esp + edi + 0x48], al
mov eax, edx
shr eax, cl
test cl, 0x20
jne 0x406b40
mov eax, ebx
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0xc]
mov edx, dword [esp]
shrd edi, edx, cl
mov ebx, dword [esp + 0xa0]
mov byte [esp + ebx + 0x48], al
shr edx, cl
test cl, 0x20
jne 0x406b62
mov edx, edi
mov eax, dword [esp + 0x10]
mov byte [esp + eax + 0x48], dl
lea eax, [esp + 0x48]
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 0x406411
mov ecx, dword [esp + 8]
mov eax, ecx
xor eax, esi
and ecx, esi
add ecx, ecx
add ecx, eax
mov dword [esp + 8], ecx
adc dword [esp + 4], 0
mov eax, dword [esp + 0x38]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
cmp dword [esp + 0x14], 0
je 0x406c22
xor ebx, ebx
mov eax, 0xfffffffe
cmp eax, dword [esp + 0x30]
mov eax, 0
sbb eax, dword [esp + 0x34]
jb 0x406bd3
xor esi, esi
jmp 0x406bd7
lea esi, [esp + 0x30]
mov eax, 0xfffffffe
cmp eax, dword [esp + 0xc]
mov eax, 0
sbb eax, dword [esp]
jb 0x406bf1
mov edx, 0
jmp 0x406bf5
lea edx, [esp + 0x38]
jae 0x406bfb
lea ebx, [esp + 0x28]
lea ecx, [esp + 0xa8]
push esi
push ebx
call fcn.00406d50
add esp, 8
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x3c]
mov dword [esp], eax
movzx eax, word [esp + 0x24]
movzx edi, word [esp + 0x44]
movzx esi, word [esp + 0x84]
movzx ebx, word [esp + 0x18]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
push dword [ebp + 0x40]
push dword [ebp + 0x3c]
push dword [esp + 0x90]
push dword [esp + 0x40]
push dword [esp + 0x40]
push eax
push edi
push dword [esp + 0xac]
push dword [esp + 0x4c]
push dword [esp + 0x4c]
push dword [esp + 0x28]
push dword [esp + 0x38]
push dword [esp + 0xbc]
push dword [ebp + 0x18]
push esi
push dword [esp + 0x50]
push ebx
call fcn.00406e10
add esp, 0x44
test eax, eax
je 0x406411
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 0x406413