Function at 0x405cb0
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 edi, dword [ebp + 0x28]
mov ebx, dword [ebp + 8]
mov dword [esp + 0x3c], edi
mov dword [esp], eax
mov dword [esp + 0x38], eax
mov edx, dword [ebx]
mov ecx, dword [ebx + 4]
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov eax, dword [ebp + 0x20]
mov esi, 6
test eax, eax
js 0x405cfe
mov esi, eax
mov dword [esp + 8], ecx
mov eax, dword [esp]
mov dword [esp + 0x10], edi
or eax, edi
je 0x405d1b
mov edi, esi
and edi, 0x400
mov ax, 8
jmp 0x405d35
cmp dword [ebp + 0x14], 0
setne al
mov edi, esi
and edi, 0x400
sete cl
and cl, al
movzx eax, cl
shl eax, 3
test esi, 0x10000
mov dword [esp + 4], edx
jne 0x405d49
movzx eax, ax
or eax, 0x800
mov dword [esp + 0x88], eax
and esi, 0xf
sete ah
test edi, edi
setne al
mov ecx, dword [ebx + 0x48]
mov dword [esp + 0xc], ecx
test ecx, ecx
je 0x405dbc
cmp dword [ebx + 0x14], 2
jne 0x405dbc
cmp dword [ebp + 0x14], 0
sete cl
cmp dword [ebp + 0x10], 0
setne dl
cmp dword [ebp + 0xc], 0
je 0x405dbc
or dl, cl
je 0x405dbc
cmp word [ebp + 0x1c], 0
setne cl
cmp dword [ebp + 0x18], 0
sete dl
test dl, cl
jne 0x405dbc
cmp esi, 0xb
jae 0x405dbc
mov edx, dword [esp + 0xc]
cmp dword [edx + 0x34], 0
mov ecx, dword [ebx + 0x10]
je 0x405dcf
xor ebx, ebx
cmp ecx, 0xffffffff
jne 0x405de9
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 2
jmp 0x405dc5
mov dword [ebx + 0x1c], 0x18
xor ebx, ebx
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
cmp dword [esp + 0x10], 0
jne 0x405de0
mov bl, 1
cmp ecx, 0xffff
jne 0x405de9
mov dword [edx + 0x34], 1
xor ebx, ebx
mov ecx, dword [esp]
or ecx, dword [esp + 0x10]
je 0x405e02
test edi, edi
jne 0x405e02
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
jmp 0x405dc3
mov ecx, dword [ebp + 0xc]
cmp byte [ecx], 0x2f
je 0x405e87
test edi, edi
je 0x405e1f
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x8c], eax
mov byte [esp + 0x24], 1
jmp 0x405e71
or ah, al
mov byte [esp], ah
mov eax, dword [ebp + 0x14]
push eax
push dword [ebp + 0x10]
push 0
call fcn.00403b90
add esp, 0xc
mov dword [esp + 0x8c], eax
mov dword [esp + 0x10], 0
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], 0
mov eax, 0
cmp ecx, 4
setb cl
jb 0x405e62
mov eax, esi
or cl, byte [esp]
mov byte [esp + 0x24], cl
mov ecx, dword [ebp + 0x14]
mov dword [esp], ecx
mov esi, eax
push dword [ebp + 0xc]
call fcn.00409070
add esp, 4
mov dword [esp + 0x14], eax
cmp eax, 0x10000
jb 0x405e96
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x405dc3
movzx eax, word [ebp + 0x1c]
mov dword [esp + 0x84], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x20]
mov eax, dword [ecx + 0x24]
or eax, edx
je 0x405ebf
lea eax, [edx - 1]
mov ecx, dword [ecx]
and ecx, eax
sub edx, ecx
and edx, eax
mov dword [esp + 0x20], edx
jmp 0x405ec7
mov dword [esp + 0x20], 0
mov eax, dword [esp + 0xc]
mov eax, dword [eax + 4]
xor ecx, ecx
mov edx, eax
add edx, dword [esp + 0x84]
setb cl
add edx, dword [esp + 0x14]
adc ecx, 0
add edx, 0x4b
adc ecx, 0xffffffff
cmp edx, 1
sbb ecx, 0xffffffff
jae 0x405f00
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x405dc3
mov ecx, 0x1c
test bl, bl
je 0x405f6d
mov edx, 0xffffffff
mov ebx, dword [esp + 0x14]
mov ecx, ebx
shr ecx, 0x1f
mov dword [esp + 0x80], ecx
mov ecx, dword [esp + 0x84]
add ecx, dword [ebp + 0x38]
adc edx, 0
add ecx, dword [ebp + 0x40]
adc edx, 0
add ebx, ebx
add ecx, ebx
adc edx, dword [esp + 0x80]
add ecx, dword [esp + 0x20]
adc edx, 0
add ecx, eax
adc edx, 0
mov ebx, dword [ebp + 8]
add ecx, dword [ebx]
adc edx, dword [ebx + 4]
add ecx, 0x72
adc edx, 0
xor ecx, ecx
cmp edx, 0xffffffff
jae 0x405f6d
mov ecx, dword [esp + 0xc]
mov dword [ecx + 0x34], 1
mov ecx, 0x1c
mov dword [esp + 0x80], 0
mov ebx, dword [esp + 0x14]
test ebx, ebx
je 0x405fac
mov edx, dword [ebp + 0xc]
cmp byte [edx + ebx - 1], 0x2f
jne 0x405fac
cmp dword [ebp + 0x14], 0
jne 0x405df6
mov dword [esp + 0x80], 0x10
mov edx, dword [esp]
or edx, dword [esp + 0x10]
jne 0x405df6
mov edx, dword [esp + 0x84]
add edx, ebx
add eax, edx
add eax, ecx
add eax, 0x2e
mov ecx, dword [esp + 0xc]
cmp dword [ecx + 8], eax
mov ebx, dword [ebp + 8]
jae 0x405fe5
mov ecx, ebx
mov edx, dword [esp + 0xc]
push 1
push eax
call fcn.00408ed0
mov ecx, dword [esp + 0x14]
add esp, 8
test eax, eax
je 0x406109
mov eax, dword [ecx + 0x14]
inc eax
cmp dword [ecx + 0x18], eax
jae 0x40600a
mov ecx, dword [esp + 0xc]
lea edx, [ecx + 0x10]
mov ecx, ebx
push 1
push eax
call fcn.00408ed0
add esp, 8
test eax, eax
je 0x406109
cmp dword [ebp + 0x14], 0
sete cl
xor eax, eax
or cl, byte [esp + 0x24]
jne 0x406031
push 0x4df40
push 1
push dword [ebx + 0x34]
call dword [ebx + 0x28]
add esp, 0xc
test eax, eax
je 0x406109
mov dword [esp + 0x1c], eax
mov ecx, ebx
mov edx, dword [esp + 4]
push dword [esp + 0x20]
mov ebx, dword [esp + 0xc]
push ebx
call fcn.00406800
add esp, 8
test eax, eax
je 0x406115
test edi, edi
setne al
mov edx, dword [esp + 4]
add edx, dword [esp + 0x20]
adc ebx, 0
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], ebx
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 ecx, byte [esp + 0x24]
xor cl, 1
or cl, al
mov byte [esp + 0x44], cl
movzx eax, cl
shl eax, 3
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0xc]
cmp dword [eax + 0x34], 0
mov edi, ebx
je 0x40612a
xor eax, eax
mov ecx, 0xfffffffe
cmp ecx, dword [esp]
mov ebx, 0
sbb ebx, dword [esp + 0x10]
mov dword [esp + 8], edi
mov dword [esp + 4], edx
jb 0x406143
cmp ecx, edx
mov ebx, 0
sbb ebx, edi
jb 0x406143
mov dword [esp], edx
mov ecx, edi
mov dword [esp + 0x10], 0
jmp 0x40627b
mov dword [ebx + 0x1c], 0x10
jmp 0x405dc3
push dword [esp + 0x1c]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
jmp 0x405dc3
mov ebx, edx
test edi, edi
mov edx, dword [esp + 0x14]
je 0x406159
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x405dc3
cmp ecx, edx
mov ebx, 0
sbb ebx, edi
jb 0x406232
xor ebx, ebx
jmp 0x406236
mov dword [esp + 0x60], 0x4034b50
movzx eax, byte [esp + 0x44]
test al, al
je 0x40616c
mov al, 0x14
mov byte [esp + 0x64], al
mov ecx, dword [esp + 0x88]
movzx eax, cx
mov byte [esp + 0x66], cl
mov byte [esp + 0x67], ah
mov eax, dword [esp + 0x20]
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 byte [esp + 0x7a], dl
mov byte [esp + 0x7b], dh
mov eax, dword [ebp + 0x38]
mov byte [esp + 0x7c], al
mov byte [esp + 0x7d], ah
lea eax, [esp + 0x60]
push 0x1e
push eax
push edi
mov dword [esp + 0x10], ebx
push ebx
mov ebx, dword [ebp + 8]
push dword [ebx + 0x44]
call dword [ebx + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x40638d
mov eax, dword [esp + 4]
add eax, 0x1e
adc edi, 0
push dword [esp + 0x14]
push dword [ebp + 0xc]
push edi
mov dword [esp + 0x10], eax
push eax
push dword [ebx + 0x44]
call dword [ebx + 0x3c]
add esp, 0x14
cmp eax, dword [esp + 0x14]
jne 0x406380
mov ecx, dword [esp + 4]
add ecx, dword [esp + 0x14]
adc edi, 0
mov dword [esp + 8], edi
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
jmp 0x4063a5
lea ebx, [esp + 0x30]
cmp ecx, dword [esp]
mov ecx, 0
sbb ecx, dword [esp + 0x10]
jb 0x40624b
mov edi, 0
jmp 0x40624f
lea edi, [esp + 0x28]
jae 0x406255
lea eax, [esp + 0x38]
lea ecx, [esp + 0xa0]
mov dword [esp + 0x10], ecx
mov edx, eax
push ebx
push edi
call fcn.004068a0
add esp, 8
mov ecx, dword [esp + 0x30]
mov dword [esp], ecx
mov ecx, dword [esp + 0x34]
mov edi, dword [esp + 8]
mov dword [esp + 0xc], eax
mov edx, dword [ebp + 0x38]
add edx, eax
mov dword [esp + 0x60], 0x4034b50
movzx eax, byte [esp + 0x44]
test al, al
je 0x406297
mov al, 0x14
mov byte [esp + 0x64], al
mov byte [esp + 0x65], 0
movzx ebx, word [esp + 0x88]
mov byte [esp + 0x66], bl
mov byte [esp + 0x67], bh
mov ebx, dword [esp + 0x20]
mov byte [esp + 0x68], bl
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 eax, dword [esp + 0x14]
mov byte [esp + 0x7a], al
mov byte [esp + 0x7b], ah
mov byte [esp + 0x7c], dl
mov byte [esp + 0x7d], dh
lea edx, [esp + 0x60]
push 0x1e
push edx
push ecx
push dword [esp + 0xc]
mov ebx, dword [ebp + 8]
push dword [ebx + 0x44]
call dword [ebx + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x40638d
mov eax, dword [esp + 4]
add eax, 0x1e
mov ecx, edi
adc ecx, 0
mov edi, dword [esp + 0x14]
push edi
push dword [ebp + 0xc]
push ecx
push eax
push dword [ebx + 0x44]
call dword [ebx + 0x3c]
add esp, 0x14
cmp eax, edi
jne 0x406380
mov edi, dword [esp + 8]
mov ecx, dword [esp + 0x14]
add ecx, dword [esp + 4]
adc edi, 0
add ecx, 0x1e
adc edi, 0
cmp dword [esp + 0x10], 0
je 0x406399
lea eax, [esp + 0xa0]
push dword [esp + 0xc]
push eax
push edi
push ecx
push dword [ebx + 0x44]
mov dword [esp + 0x14], ecx
call dword [ebx + 0x3c]
add esp, 0x14
mov ecx, dword [esp + 0xc]
cmp eax, ecx
jne 0x40638d
mov eax, ecx
mov ecx, dword [esp]
add ecx, eax
adc edi, 0
mov dword [esp + 8], edi
jmp 0x4063a5
push dword [esp + 0x1c]
push dword [ebx + 0x34]
call dword [ebx + 0x2c]
add esp, 8
mov dword [ebx + 0x1c], 0x13
jmp 0x405dc3
mov dword [esp + 8], edi
mov dword [esp + 0x10], 0
mov eax, dword [ebp + 0x38]
test eax, eax
mov dword [esp], ecx
je 0x4063cf
push eax
push dword [ebp + 0x34]
push dword [esp + 0x10]
push ecx
push dword [ebx + 0x44]
mov edi, eax
call dword [ebx + 0x3c]
add esp, 0x14
cmp eax, edi
jne 0x40638d
add dword [esp], edi
adc dword [esp + 8], 0
cmp byte [esp + 0x24], 0
je 0x406414
mov esi, dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [esp + 0x10]
push dword [esp + 0xc]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x4065cf
mov ecx, esi
add dword [esp], esi
adc dword [esp + 8], 0
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], 0
jmp 0x4064cf
cmp dword [ebp + 0x14], 0
je 0x4064cf
mov eax, dword [ebp + 8]
mov dword [esp + 0x48], eax
mov eax, dword [esp]
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
mov ecx, dword [esi*4 + 0x43984c]
xor eax, eax
cmp esi, 4
setb al
shl eax, 0xe
or eax, ecx
test esi, esi
jne 0x40646b
not ecx
or ecx, 0xfff7ffff
add eax, ecx
add eax, 0x80001
lea ecx, [esp + 0x48]
push eax
push ecx
push 0x406910
mov esi, dword [esp + 0x28]
push esi
call fcn.00405090
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.00403c70
add esp, 0x18
cmp eax, 1
jne 0x4065fa
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], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 8], eax
push dword [esp + 0x1c]
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 edi, eax
mov dword [esp + 4], ecx
or eax, ecx
je 0x4065eb
mov dword [esp + 0x48], 0x8074b50
mov ecx, dword [esp + 0x8c]
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 + 0x10], 0
je 0x406616
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, edi
mov byte [esp + 0x58], cl
mov byte [esp + 0x59], ch
mov eax, edi
shr eax, 0x10
mov byte [esp + 0x5a], al
mov eax, edi
shr eax, 0x18
mov byte [esp + 0x5b], al
mov dword [esp + 0x44], 0x38
mov dword [esp + 0x94], 0x30
mov ecx, 0x28
mov dword [esp + 0x24], 0x18
mov dword [esp + 0x1c], 0x17
mov eax, dword [esp + 4]
mov byte [esp + 0x1b], al
mov dword [esp + 0x98], 0x16
mov dword [esp + 0x90], 0x15
mov esi, 0x14
jmp 0x40666b
push dword [esp + 0x1c]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x405dc3
mov dword [esp + 4], 0
xor ecx, ecx
jmp 0x406713
push dword [esp + 0x1c]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0xc
jmp 0x405dc3
test ecx, ecx
jne 0x406134
mov dword [esp + 0x50], ebx
mov dword [esp + 0x44], 0x18
mov dword [esp + 0x94], 0x10
mov ecx, 8
mov dword [esp + 0x1c], 0xf
mov dword [esp + 0x98], 0xe
mov eax, edi
mov byte [esp + 0x1b], al
mov dword [esp + 0x90], 0xd
mov esi, 0xc
mov dword [esp + 0x24], 0x10
mov ebx, edi
mov eax, dword [esp + 4]
shrd ebx, eax, cl
shr eax, cl
movzx edx, byte [esp + 0x1b]
mov byte [esp + esi + 0x48], dl
test cl, 0x20
jne 0x406686
mov eax, ebx
mov ebx, edi
mov ecx, dword [esp + 0x94]
mov edx, dword [esp + 4]
shrd ebx, edx, cl
mov esi, dword [esp + 0x90]
mov byte [esp + esi + 0x48], al
mov eax, edx
shr eax, cl
test cl, 0x20
jne 0x4066ac
mov eax, ebx
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 4]
shrd edi, edx, cl
mov esi, edi
mov edi, dword [esp + 0x98]
mov byte [esp + edi + 0x48], al
shr edx, cl
test cl, 0x20
jne 0x4066cd
mov edx, esi
mov eax, dword [esp + 0x1c]
mov byte [esp + eax + 0x48], dl
lea eax, [esp + 0x48]
mov esi, dword [esp + 0x24]
push esi
push eax
push dword [esp + 0x10]
push dword [esp + 0xc]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x405dc3
mov eax, dword [esp + 0x24]
add dword [esp], eax
adc dword [esp + 8], 0
mov eax, dword [esp + 0x38]
mov dword [esp + 4], eax
mov ecx, dword [esp + 0x3c]
mov edi, dword [ebp + 0x3c]
cmp dword [esp + 0x10], 0
je 0x40677a
xor edx, edx
mov esi, 0xfffffffe
cmp esi, dword [esp + 0x30]
mov eax, 0
sbb eax, dword [esp + 0x34]
jb 0x406737
xor ebx, ebx
jmp 0x40673b
lea ebx, [esp + 0x30]
cmp esi, dword [esp + 4]
mov eax, 0
sbb eax, ecx
jb 0x40674f
mov eax, 0
jmp 0x406753
lea eax, [esp + 0x28]
jae 0x406759
lea edx, [esp + 0x38]
lea ecx, [esp + 0xa0]
push ebx
push eax
call fcn.004068a0
add esp, 8
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 4], eax
mov ecx, dword [esp + 0x3c]
movzx esi, word [esp + 0x88]
movzx eax, word [esp + 0x20]
movzx edx, word [esp + 0xc]
movzx ebx, word [esp + 0x14]
push dword [ebp + 0x40]
push edi
push dword [esp + 0x88]
push dword [esp + 0x40]
push dword [esp + 0x40]
push 0
push 0
push esi
push eax
push dword [esp + 0xb0]
push dword [esp + 0x54]
push dword [esp + 0x54]
push ecx
push dword [esp + 0x38]
push dword [esp + 0xbc]
push dword [ebp + 0x18]
push edx
push dword [esp + 0x54]
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00406960
add esp, 0x54
test eax, eax
je 0x405dc3
mov eax, dword [ebp + 8]
inc dword [eax + 0x10]
mov ecx, dword [esp]
mov dword [eax], ecx
mov ecx, dword [esp + 8]
mov dword [eax + 4], ecx
mov ebx, 1
jmp 0x405dc5