Function at 0x405e90
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 edx, dword [ebp + 0x28]
mov eax, dword [ebp + 8]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], edi
mov ecx, dword [eax]
mov ebx, eax
mov eax, dword [eax + 4]
mov dword [esp + 0x20], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov eax, dword [ebp + 0x20]
mov esi, 6
test eax, eax
js 0x405ee1
mov esi, eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x4c], edi
mov eax, edi
or eax, edx
je 0x405ef9
mov ecx, esi
and ecx, 0x400
jmp 0x405f0d
mov edi, esi
and edi, 0x400
xor ecx, ecx
cmp dword [ebp + 0x14], 0
je 0x405f13
test edi, edi
jne 0x405f13
mov edi, ecx
mov cx, 8
test esi, 0x10000
mov dword [esp + 0x10], edx
jne 0x405f28
movzx ecx, cx
or ecx, 0x800
and esi, 0xf
sete al
test edi, edi
setne ah
mov edx, dword [ebx + 0x48]
mov dword [esp + 8], edx
test edx, edx
je 0x405fb1
cmp dword [ebx + 0x14], 2
jne 0x405fb1
mov dword [esp + 4], edi
mov edi, dword [ebp + 0xc]
cmp dword [ebp + 0x14], 0
je 0x405f61
test edi, edi
mov edi, dword [esp + 4]
je 0x405fb1
cmp dword [ebp + 0x10], 0
jne 0x405f69
jmp 0x405fb1
test edi, edi
mov edi, dword [esp + 4]
je 0x405fb1
cmp word [ebp + 0x1c], 0
mov dword [esp + 0x94], ecx
setne cl
cmp dword [ebp + 0x18], 0
sete dl
test dl, cl
mov ebx, dword [ebp + 8]
jne 0x405fb1
cmp esi, 0xb
jae 0x405fb1
mov ecx, dword [esp + 8]
mov edx, dword [ecx + 0x34]
mov ecx, dword [ebx + 0x10]
test edx, edx
je 0x405fc2
mov dword [esp], edx
cmp ecx, 0xffffffff
mov edx, dword [esp + 0x10]
jne 0x405feb
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 2
jmp 0x405fb8
mov dword [ebx + 0x1c], 0x18
xor eax, eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, dword [esp + 0x10]
test edx, edx
jne 0x405fd9
mov dword [esp], 0
cmp ecx, 0xffff
jne 0x405feb
mov ecx, dword [esp + 8]
mov dword [ecx + 0x34], 1
mov dword [esp], 1
mov ecx, dword [esp + 0x4c]
or ecx, edx
je 0x406003
test edi, edi
jne 0x406003
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
jmp 0x405fb8
mov ecx, dword [ebp + 0xc]
cmp byte [ecx], 0x2f
je 0x40607f
or al, ah
mov byte [esp + 0x1c], al
test edi, edi
je 0x406021
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x90], eax
jmp 0x40606b
mov edi, dword [ebp + 0x14]
push edi
push dword [ebp + 0x10]
push 0
call fcn.00403bc0
add esp, 0xc
mov ecx, edi
mov dword [esp + 0x90], eax
mov dword [esp + 0x10], 0
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], 0
mov eax, 0
cmp edi, 4
setb cl
jb 0x40605e
mov eax, esi
or byte [esp + 0x1c], cl
mov dword [esp + 0x4c], edi
mov esi, eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00409420
add esp, 4
cmp eax, 0x10000
mov edi, dword [esp + 8]
jb 0x40608e
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x405fb8
mov dword [esp + 0x34], eax
mov eax, dword [ebx + 0x20]
xor edx, edx
mov ecx, dword [ebx + 0x24]
or ecx, eax
mov ecx, 0
je 0x4060b7
lea ecx, [eax - 2]
inc ecx
mov edi, ecx
mov ecx, dword [ebx]
and ecx, edi
sub eax, ecx
and eax, edi
mov edi, dword [esp + 8]
mov ecx, eax
mov dword [esp + 0x44], ecx
movzx eax, word [ebp + 0x1c]
mov dword [esp + 0xa0], eax
mov ebx, dword [esp + 0x34]
add eax, ebx
adc edx, 0xffffffff
mov ecx, dword [edi + 4]
mov dword [esp + 0x8c], ecx
add eax, ecx
adc edx, 0
mov ecx, eax
mov dword [esp + 0x48], eax
add eax, 0x4b
adc edx, 0
cmp eax, 1
sbb edx, 0xffffffff
jae 0x406101
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x405fb8
cmp dword [esp], 0
jne 0x40616b
mov eax, ebx
shr eax, 0x1f
mov ecx, dword [esp + 0xa0]
add ecx, dword [ebp + 0x38]
mov edx, 0xffffffff
adc edx, 0
add ebx, ebx
add ecx, dword [ebp + 0x40]
adc edx, 0
add ecx, ebx
adc edx, eax
add ecx, dword [esp + 0x44]
adc edx, 0
add ecx, dword [esp + 0x8c]
adc edx, 0
mov eax, dword [ebp + 8]
add ecx, dword [eax]
adc edx, dword [eax + 4]
mov ebx, dword [esp + 0x34]
add ecx, 0x72
adc edx, 0
mov dword [esp], 0
mov eax, 0xffffffff
cmp edx, eax
jae 0x40616b
mov dword [edi + 0x34], 1
mov dword [esp], 1
xor edx, edx
test ebx, ebx
je 0x4061a3
mov eax, dword [ebp + 0xc]
mov ecx, dword [esp + 0x34]
cmp byte [ecx + eax - 1], 0x2f
mov ecx, dword [ebp + 8]
jne 0x4061a6
cmp dword [ebp + 0x14], 0
jne 0x406197
mov edx, 0x10
mov eax, dword [esp + 0x10]
or dword [esp + 0x4c], eax
je 0x4061a6
mov dword [ecx + 0x1c], 0x18
jmp 0x405fb8
mov ecx, dword [ebp + 8]
mov dword [esp + 0x4c], edx
mov eax, dword [esp]
test eax, eax
je 0x4061b6
mov eax, 0x1c
mov edx, dword [esp + 0x48]
add eax, edx
add eax, 0x2e
mov edx, dword [edi + 8]
cmp edx, eax
mov dword [esp + 0x10], esi
jae 0x406218
mov esi, 1
test edx, edx
je 0x4061ef
mov esi, edx
jmp 0x4061ef
mov ecx, esi
and ecx, 0xfffffffd
mov edx, esi
and edx, 2
or esi, 2
imul esi, edx
xor edx, 2
imul edx, ecx
add esi, edx
cmp esi, eax
jb 0x4061d7
push esi
push dword [edi + 0xc]
push dword [edi]
mov ebx, edi
mov edi, dword [ebp + 8]
push dword [edi + 0x34]
call dword [edi + 0x30]
add esp, 0x10
test eax, eax
je 0x40638e
mov dword [ebx], eax
mov dword [ebx + 8], esi
mov ecx, edi
mov edi, ebx
mov eax, dword [edi + 0x14]
mov edx, dword [edi + 0x18]
inc eax
cmp edx, eax
jae 0x406271
mov esi, 1
test edx, edx
je 0x406248
mov esi, edx
jmp 0x406248
mov ecx, esi
and ecx, 0xfffffffd
mov edx, esi
and edx, 2
or esi, 2
imul esi, edx
xor edx, 2
imul edx, ecx
add esi, edx
cmp esi, eax
jb 0x406230
push esi
push dword [edi + 0x1c]
push dword [edi + 0x10]
mov ebx, edi
mov edi, dword [ebp + 8]
push dword [edi + 0x34]
call dword [edi + 0x30]
add esp, 0x10
test eax, eax
je 0x40638e
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x18], esi
mov ecx, edi
cmp dword [ebp + 0x14], 0
sete dl
xor eax, eax
or dl, byte [esp + 0x1c]
jne 0x40629e
push 0x4df40
push 1
push dword [ecx + 0x34]
mov eax, dword [ebp + 8]
call dword [eax + 0x28]
mov ecx, dword [ebp + 8]
add esp, 0xc
test eax, eax
je 0x4063dc
mov dword [esp], eax
mov edi, dword [esp + 0x14]
mov edx, edi
mov ebx, dword [esp + 0x44]
push ebx
mov esi, dword [esp + 0x10]
push esi
call fcn.00406a80
add esp, 8
test eax, eax
je 0x40639a
cmp dword [esp + 4], 0
sete dl
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
add eax, ebx
adc ecx, 0
mov dword [esp + 4], eax
mov dword [esp + 0x20], eax
add edi, ebx
mov ebx, edx
mov dword [esp + 0x14], edi
adc esi, 0
mov dword [esp + 0x24], ecx
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 dword [esp + 0x84], 0
mov word [esp + 0x88], 0
and bl, byte [esp + 0x1c]
mov edx, ebx
xor dl, 1
movzx edx, dl
shl edx, 3
mov dword [esp + 0x48], edx
mov eax, dword [esp + 8]
cmp dword [eax + 0x34], 0
je 0x4063ae
mov dword [esp + 0xc], esi
mov eax, 0xfffffffe
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x2c]
cmp eax, edi
mov edx, 0
sbb edx, esi
jb 0x4063e8
cmp eax, dword [esp + 4]
mov edx, 0
sbb edx, ecx
jb 0x4063e8
mov dword [esp + 8], 0
xor eax, eax
mov esi, dword [esp + 4]
jmp 0x406440
mov dword [edi + 0x1c], 0x10
jmp 0x405fb8
push dword [esp]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
jmp 0x405fb8
cmp dword [esp + 0x3c], 0
jne 0x4068a1
test esi, esi
jne 0x4068a1
mov dword [esp + 0x6c], 0x4034b50
test bl, bl
mov dword [esp + 0xc], esi
jne 0x40654b
mov dl, 0x14
jmp 0x40654d
mov dword [ecx + 0x1c], 0x10
jmp 0x405fb8
mov edx, 0xfffffffe
cmp eax, dword [esp + 4]
mov eax, 0
sbb eax, ecx
jb 0x4063fe
xor eax, eax
jmp 0x406402
lea eax, [esp + 0x20]
cmp edx, edi
mov ecx, 0
sbb ecx, esi
jb 0x406414
mov edx, 0
jmp 0x406418
lea edx, [esp + 0x28]
mov esi, 0
jae 0x406423
lea esi, [esp + 0x38]
lea ecx, [esp + 0xa8]
mov dword [esp + 8], ecx
push eax
push esi
call fcn.00406b30
add esp, 8
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edx, dword [ebp + 0x38]
add edx, eax
mov dword [esp + 0x6c], 0x4034b50
test bl, bl
mov dword [esp + 4], eax
jne 0x406459
mov bl, 0x14
jmp 0x40645b
xor ebx, ebx
mov byte [esp + 0x70], bl
mov byte [esp + 0x71], 0
movzx ebx, word [esp + 0x94]
mov byte [esp + 0x72], bl
mov byte [esp + 0x73], bh
mov ebx, dword [esp + 0x48]
mov byte [esp + 0x74], bl
mov dword [esp + 0x75], 0
mov dword [esp + 0x79], 0
mov dword [esp + 0x7d], 0
mov dword [esp + 0x81], 0
mov byte [esp + 0x85], 0
mov ebx, dword [esp + 0x34]
mov byte [esp + 0x86], bl
mov byte [esp + 0x87], bh
mov byte [esp + 0x88], dl
mov byte [esp + 0x89], dh
lea edx, [esp + 0x6c]
push 0x1e
push edx
push ecx
push esi
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x40669b
mov edi, dword [esp + 0x14]
add edi, 0x1e
mov eax, esi
mov esi, dword [esp + 0xc]
adc esi, 0
push ebx
push dword [ebp + 0xc]
push esi
push edi
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x40668c
add edi, ebx
adc esi, 0
cmp dword [esp + 8], 0
mov ebx, edi
je 0x40661b
lea eax, [esp + 0xa8]
mov edi, dword [esp + 4]
push edi
push eax
push esi
push ebx
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, edi
jne 0x4066a7
add ebx, edi
adc esi, 0
jmp 0x406623
xor edx, edx
mov eax, dword [esp + 4]
mov byte [esp + 0x70], dl
mov ebx, dword [esp + 0x94]
movzx edx, bx
mov byte [esp + 0x72], bl
mov byte [esp + 0x73], dh
mov edx, dword [esp + 0x48]
mov byte [esp + 0x74], dl
mov dword [esp + 0x75], 0
mov dword [esp + 0x79], 0
mov dword [esp + 0x7d], 0
mov dword [esp + 0x81], 0
mov byte [esp + 0x85], 0
mov ebx, dword [esp + 0x34]
mov byte [esp + 0x86], bl
mov byte [esp + 0x87], bh
mov edx, dword [ebp + 0x38]
mov byte [esp + 0x88], dl
mov byte [esp + 0x89], dh
lea edx, [esp + 0x6c]
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 0x40669b
mov edi, dword [esp + 0x14]
add edi, 0x1e
mov eax, esi
mov esi, dword [esp + 0xc]
adc esi, 0
push ebx
push dword [ebp + 0xc]
push esi
push edi
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x40668c
add edi, ebx
adc esi, 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov ebx, edi
jmp 0x406623
mov dword [esp + 8], 0
mov edi, dword [ebp + 0x38]
test edi, edi
je 0x406645
push edi
push dword [ebp + 0x34]
push esi
push ebx
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, edi
jne 0x4066a7
add ebx, edi
adc esi, 0
mov edi, dword [ebp + 0x14]
movzx eax, byte [esp + 0x1c]
test al, al
mov dword [esp + 0x14], ebx
mov dword [esp + 0xc], esi
je 0x4066b6
push edi
push dword [ebp + 0x10]
push esi
push ebx
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, edi
jne 0x40668c
mov eax, dword [ebp + 0x14]
add dword [esp + 0x14], eax
adc dword [esp + 0xc], 0
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], 0
jmp 0x406785
push dword [esp]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x405fb8
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x13
jmp 0x405fb8
test edi, edi
je 0x406785
mov eax, dword [ebp + 8]
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x64], 0
mov dword [esp + 0x60], 0
mov ecx, dword [esp + 0x10]
mov eax, ecx
cmp ecx, 0xa
jb 0x4066f5
mov eax, 0xa
mov ecx, dword [eax*4 + 0x43ea58]
xor eax, eax
mov edx, dword [esp + 0x10]
cmp edx, 4
setl al
shl eax, 0xe
or eax, ecx
test edx, edx
jne 0x406720
not ecx
or ecx, 0xfff7ffff
add eax, ecx
add eax, 0x80001
lea ecx, [esp + 0x50]
push eax
push ecx
push 0x406ba0
mov esi, dword [esp + 0xc]
push esi
call fcn.00405140
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.00403cf0
add esp, 0x18
cmp eax, 1
jne 0x406882
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 + 0x14], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0xc], eax
push dword [esp]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov esi, ecx
mov dword [esp + 0x10], eax
or ecx, eax
je 0x406997
mov dword [esp + 0x50], 0x8074b50
mov edx, dword [esp + 0x90]
mov byte [esp + 0x54], dl
mov byte [esp + 0x55], dh
mov ecx, edx
shr ecx, 0x10
mov byte [esp + 0x56], cl
mov ecx, edx
shr ecx, 0x18
mov byte [esp + 0x57], cl
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
cmp dword [esp + 8], 0
je 0x40689d
mov byte [esp + 0x58], cl
mov byte [esp + 0x59], ch
mov ebx, ecx
shr ebx, 0x10
mov byte [esp + 0x5a], bl
mov ebx, edx
shr ebx, 0x10
shr ecx, 0x18
mov byte [esp + 0x5b], cl
mov ecx, edx
shr ecx, 0x18
mov byte [esp + 0x5c], dl
mov byte [esp + 0x5d], dh
mov byte [esp + 0x5e], bl
mov byte [esp + 0x5f], cl
mov edx, esi
mov byte [esp + 0x60], dl
mov byte [esp + 0x61], dh
mov ecx, esi
shr ecx, 0x10
mov byte [esp + 0x62], cl
mov ecx, esi
shr ecx, 0x18
mov byte [esp + 0x63], cl
mov dword [esp + 0x44], 0x38
mov dword [esp + 0x9c], 0x30
mov ecx, 0x28
mov dword [esp], 0x18
mov dword [esp + 0x1c], 0x17
mov eax, dword [esp + 0x10]
mov edx, eax
mov byte [esp + 0x1b], al
mov dword [esp + 0x8c], 0x16
mov dword [esp + 0x98], 0x15
mov edi, 0x14
jmp 0x4068fc
push dword [esp]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0xc
jmp 0x405fb8
test edx, edx
je 0x4068b0
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x405fb8
mov dword [esp + 0x58], ecx
mov dword [esp + 0x44], 0x18
mov dword [esp + 0x9c], 0x10
mov ecx, 8
mov dword [esp + 0x1c], 0xf
mov dword [esp + 0x8c], 0xe
mov edx, esi
mov byte [esp + 0x1b], dl
mov dword [esp + 0x98], 0xd
mov edi, 0xc
mov dword [esp], 0x10
mov edx, esi
mov ebx, dword [esp + 0x10]
shrd edx, ebx, cl
shr ebx, cl
movzx eax, byte [esp + 0x1b]
mov byte [esp + edi + 0x50], al
test cl, 0x20
jne 0x406917
mov ebx, edx
mov edx, esi
mov ecx, dword [esp + 0x9c]
mov eax, dword [esp + 0x10]
shrd edx, eax, cl
mov edi, dword [esp + 0x98]
mov byte [esp + edi + 0x50], bl
mov ebx, eax
shr ebx, cl
test cl, 0x20
jne 0x40693d
mov ebx, edx
mov ecx, dword [esp + 0x44]
mov eax, dword [esp + 0x10]
shrd esi, eax, cl
mov edx, esi
mov esi, dword [esp + 0x8c]
mov byte [esp + esi + 0x50], bl
shr eax, cl
test cl, 0x20
jne 0x40695e
mov eax, edx
mov ecx, dword [esp + 0x1c]
mov byte [esp + ecx + 0x50], al
lea eax, [esp + 0x50]
mov esi, dword [esp]
push esi
push eax
push dword [esp + 0x14]
push dword [esp + 0x20]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x405fb8
mov eax, dword [esp]
add dword [esp + 0x14], eax
adc dword [esp + 0xc], 0
cmp dword [esp + 8], 0
je 0x4069f1
xor edx, edx
mov ecx, 0xfffffffe
cmp ecx, dword [esp + 0x20]
mov eax, 0
sbb eax, dword [esp + 0x24]
jb 0x4069b8
xor eax, eax
jmp 0x4069bc
lea eax, [esp + 0x20]
cmp ecx, dword [esp + 0x28]
mov ecx, 0
sbb ecx, dword [esp + 0x2c]
jb 0x4069d2
mov edi, 0
jmp 0x4069d6
lea edi, [esp + 0x38]
jae 0x4069dc
lea edx, [esp + 0x28]
lea ecx, [esp + 0xa8]
push eax
push edi
call fcn.00406b30
add esp, 8
mov dword [esp + 4], eax
movzx ebx, word [esp + 0x94]
movzx esi, word [esp + 0x48]
movzx eax, word [esp + 4]
movzx edi, word [esp + 0x34]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
push dword [ebp + 0x40]
push dword [ebp + 0x3c]
push dword [esp + 0x54]
push dword [esp + 0x30]
push dword [esp + 0x30]
push 0
push 0
push ebx
push esi
push dword [esp + 0xb4]
push dword [esp + 0x64]
push dword [esp + 0x64]
push dword [esp + 0x5c]
push dword [esp + 0x5c]
push dword [esp + 0xd8]
push dword [ebp + 0x18]
push eax
push dword [esp + 0x4c]
push edi
call fcn.00406bf0
add esp, 0x4c
test eax, eax
je 0x405fb8
mov eax, dword [ebp + 8]
inc dword [eax + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [eax], ecx
mov ecx, dword [esp + 0xc]
mov dword [eax + 4], ecx
mov eax, 1
jmp 0x405fba