Function at 0x405a00
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 edi, dword [ebp + 0x24]
mov esi, dword [ebp + 0x28]
mov edx, dword [ebp + 8]
mov dword [esp + 0x34], esi
mov dword [esp + 0x30], edi
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov dword [esp + 0x14], eax
mov dword [esp + 0x28], eax
mov dword [esp], ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], 0
mov eax, dword [ebp + 0x20]
mov ebx, 6
test eax, eax
js 0x405a52
mov ebx, eax
mov eax, edi
or eax, esi
je 0x405a61
mov eax, ebx
and eax, 0x400
jmp 0x405a75
mov ecx, ebx
and ecx, 0x400
xor eax, eax
cmp dword [ebp + 0x14], 0
je 0x405a7b
test ecx, ecx
jne 0x405a7b
mov ecx, eax
mov ax, 8
test ebx, 0x10000
jne 0x405a8b
movzx eax, ax
or eax, 0x800
mov dword [esp + 0x84], eax
and ebx, 0xf
sete al
mov dword [esp + 4], ecx
test ecx, ecx
setne cl
mov edx, dword [edx + 0x48]
mov dword [esp + 0xc], edx
test edx, edx
je 0x405b58
mov edx, dword [ebp + 8]
cmp dword [edx + 0x14], 2
jne 0x405b58
cmp dword [ebp + 0x14], 0
sete dl
cmp dword [ebp + 0x10], 0
setne ah
cmp dword [ebp + 0xc], 0
je 0x405b58
or ah, dl
je 0x405b58
cmp word [ebp + 0x1c], 0
setne dl
cmp dword [ebp + 0x18], 0
sete ah
test ah, dl
jne 0x405b58
cmp ebx, 0xb
jae 0x405b58
mov edx, dword [esp + 0xc]
mov edx, dword [edx + 0x34]
mov dword [esp + 0x1c], edx
mov edx, dword [ebp + 8]
mov edx, dword [edx + 0x10]
mov dword [esp + 8], edx
cmp dword [esp + 0x1c], 0
je 0x405b20
cmp dword [esp + 8], 0xffffffff
jne 0x405b4b
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 2
jmp 0x405b62
mov edx, dword [esp + 8]
test esi, esi
jne 0x405b38
mov dword [esp + 0x1c], 0
cmp edx, 0xffff
jne 0x405b4b
mov edx, dword [esp + 0xc]
mov dword [edx + 0x34], 1
mov dword [esp + 0x1c], 1
mov edx, edi
or edx, esi
je 0x405b6c
cmp dword [esp + 4], 0
jne 0x405b6c
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x18
xor eax, eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, dword [ebp + 0xc]
cmp byte [edx], 0x2f
mov edx, dword [ebp + 8]
jne 0x405b80
mov dword [edx + 0x1c], 0x19
jmp 0x405b62
or al, cl
movzx eax, al
mov dword [esp + 8], eax
cmp dword [esp + 4], 0
je 0x405ba0
mov eax, dword [ebp + 0x2c]
mov dword [esp + 0x88], eax
mov dword [esp + 0x20], ebx
jmp 0x405be5
mov edi, dword [ebp + 0x14]
push edi
push dword [ebp + 0x10]
push 0
call fcn.004036f0
add esp, 0xc
mov dword [esp + 0x88], eax
xor esi, esi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], 0
mov eax, 0
cmp edi, 4
jb 0x405bd2
mov eax, ebx
mov dword [esp + 0x20], eax
mov eax, 1
jb 0x405be1
mov eax, dword [esp + 8]
mov dword [esp + 8], eax
push dword [ebp + 0xc]
call fcn.00408f10
add esp, 4
cmp eax, 0x10000
jb 0x405c06
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x405b62
mov dword [esp + 0x24], eax
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x20]
xor edx, edx
mov ecx, dword [ebx + 0x24]
or ecx, eax
mov ecx, 0
je 0x405c35
lea ecx, [eax - 2]
inc ecx
and ecx, dword [ebx]
mov ebx, eax
sub ebx, ecx
mov ecx, eax
or ecx, 0xfffffffe
and eax, 0xfffffffe
add ecx, eax
inc ecx
and ecx, ebx
mov dword [esp + 0x3c], ecx
movzx eax, word [ebp + 0x1c]
mov dword [esp + 0x98], eax
add eax, dword [esp + 0x24]
adc edx, 0xffffffff
mov ecx, dword [esp + 0xc]
mov ecx, dword [ecx + 4]
add eax, ecx
adc edx, 0
mov ebx, eax
add ebx, 0x4b
adc edx, 0
cmp ebx, 1
sbb edx, 0xffffffff
jae 0x405c76
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x405b62
mov ebx, dword [esp + 0x1c]
test ebx, ebx
jne 0x405ce8
mov edx, dword [esp + 0x24]
shr edx, 0x1f
mov dword [esp + 0x1c], edx
mov ebx, dword [esp + 0x98]
add ebx, dword [ebp + 0x38]
mov edx, 0xffffffff
adc edx, 0
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x24]
add ecx, ecx
add ebx, dword [ebp + 0x40]
adc edx, 0
add ebx, ecx
adc edx, dword [esp + 0x1c]
add ebx, dword [esp + 0x3c]
adc edx, 0
add ebx, dword [esp + 0x10]
adc edx, 0
mov ecx, dword [ebp + 8]
add ebx, dword [ecx]
adc edx, dword [ecx + 4]
add ebx, 0x72
adc edx, 0
xor ebx, ebx
mov ecx, 0xffffffff
cmp edx, ecx
jae 0x405ce8
mov ecx, dword [esp + 0xc]
mov dword [ecx + 0x34], 1
mov ebx, 1
mov dword [esp + 0x1c], 0
mov edx, dword [esp + 0x24]
test edx, edx
je 0x405d1f
mov ecx, dword [ebp + 0xc]
cmp byte [edx + ecx - 1], 0x2f
mov ecx, dword [ebp + 8]
jne 0x405d1f
cmp dword [ebp + 0x14], 0
jne 0x405ee9
mov dword [esp + 0x1c], 0x10
or edi, esi
jne 0x405ee9
test ebx, ebx
je 0x405d28
mov ebx, 0x1c
add eax, ebx
add eax, 0x2e
mov ebx, dword [esp + 0xc]
mov edx, dword [ebx + 8]
cmp edx, eax
jae 0x405d6a
mov ecx, 1
test edx, edx
je 0x405d43
mov ecx, edx
mov esi, ecx
add ecx, ecx
cmp esi, eax
jb 0x405d43
push esi
push dword [ebx + 0xc]
push dword [ebx]
mov edi, dword [ebp + 8]
push dword [edi + 0x34]
call dword [edi + 0x30]
add esp, 0x10
test eax, eax
je 0x405ec8
mov dword [ebx], eax
mov dword [ebx + 8], esi
mov eax, dword [ebx + 0x14]
mov edx, dword [ebx + 0x18]
inc eax
cmp edx, eax
jae 0x405da9
mov ecx, 1
test edx, edx
je 0x405d80
mov ecx, edx
mov esi, ecx
add ecx, ecx
cmp esi, eax
jb 0x405d80
push esi
push dword [ebx + 0x1c]
push dword [ebx + 0x10]
mov edi, dword [ebp + 8]
push dword [edi + 0x34]
call dword [edi + 0x30]
add esp, 0x10
test eax, eax
je 0x405ec8
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x18], esi
xor eax, eax
cmp dword [ebp + 0x14], 0
mov ecx, dword [ebp + 8]
je 0x405dd9
cmp dword [esp + 8], 0
jne 0x405dd9
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 0x405fe0
mov dword [esp + 0x10], eax
mov edi, dword [esp + 0x14]
mov edx, edi
mov esi, dword [esp + 0x3c]
push esi
mov ebx, dword [esp + 4]
push ebx
call fcn.004065c0
add esp, 8
test eax, eax
je 0x405ed4
cmp dword [esp + 8], 0
sete dl
cmp dword [esp + 4], 0
setne dh
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
add eax, esi
adc ecx, 0
add edi, esi
mov dword [esp + 4], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
adc ebx, 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 dword [esp + 0x7c], 0
mov word [esp + 0x80], 0
or dh, dl
mov byte [esp + 0x38], dh
movzx edx, dh
shl edx, 3
mov dword [esp + 0x3c], edx
mov eax, dword [esp + 0xc]
cmp dword [eax + 0x34], 0
je 0x405ef5
mov dword [esp], ebx
mov dword [esp + 0x14], edi
xor eax, eax
mov ebx, 0xfffffffe
mov edi, dword [esp + 0x30]
mov esi, dword [esp + 0x34]
cmp ebx, edi
mov edx, 0
mov dword [esp + 0xc], esi
sbb edx, esi
jb 0x405fec
cmp ebx, dword [esp + 4]
mov edx, 0
sbb edx, ecx
jb 0x405fec
xor edi, edi
jmp 0x406045
mov dword [edi + 0x1c], 0x10
jmp 0x405b62
push dword [esp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
jmp 0x405b62
mov dword [ecx + 0x1c], 0x18
jmp 0x405b62
cmp dword [esp + 0x44], 0
jne 0x4063be
test ebx, ebx
jne 0x4063be
mov dword [esp], ebx
mov dword [esp + 0x64], 0x4034b50
movzx eax, byte [esp + 0x38]
test al, al
je 0x405f1e
mov al, 0x14
mov byte [esp + 0x68], al
mov ebx, dword [esp + 0x84]
movzx edx, bx
mov byte [esp + 0x6a], bl
mov byte [esp + 0x6b], dh
mov edx, dword [esp + 0x3c]
mov byte [esp + 0x6c], dl
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 + 0x24]
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 edx, [esp + 0x64]
push 0x1e
push edx
push ecx
push dword [esp + 0x10]
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x4061ec
add edi, 0x1e
mov eax, esi
mov esi, dword [esp]
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 0x4061dc
add edi, ebx
adc esi, 0
mov dword [esp], esi
mov dword [esp + 4], 0
mov dword [esp + 0xc], 0
mov esi, edi
jmp 0x406158
mov dword [ecx + 0x1c], 0x10
jmp 0x405b62
cmp ebx, dword [esp + 4]
mov edx, 0
sbb edx, ecx
jb 0x405ffd
xor ebx, ebx
jmp 0x406001
lea ebx, [esp + 0x28]
mov ecx, 0xfffffffe
cmp ecx, edi
mov ecx, 0
sbb ecx, dword [esp + 0xc]
jb 0x40601a
mov esi, 0
jmp 0x40601e
lea esi, [esp + 0x40]
jae 0x406024
lea eax, [esp + 0x30]
lea edi, [esp + 0xa0]
mov ecx, edi
mov edx, eax
push ebx
push esi
call fcn.00406660
add esp, 8
mov ecx, dword [esp + 0x28]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x2c]
mov edx, dword [ebp + 0x38]
movzx ebx, byte [esp + 0x38]
mov dword [esp + 0xc], eax
add edx, eax
mov dword [esp + 0x64], 0x4034b50
test bl, bl
je 0x406061
mov bl, 0x14
mov byte [esp + 0x68], bl
mov byte [esp + 0x69], 0
movzx ebx, word [esp + 0x84]
mov byte [esp + 0x6a], bl
mov byte [esp + 0x6b], bh
mov ebx, dword [esp + 0x3c]
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 + 0x24]
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 + 0x10]
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x4061ec
mov dword [esp + 4], edi
mov edi, dword [esp + 0x14]
add edi, 0x1e
mov eax, dword [esp]
adc eax, 0
push ebx
push dword [ebp + 0xc]
mov dword [esp + 8], eax
push eax
push edi
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x406144
add edi, ebx
mov ebx, dword [esp]
adc ebx, 0
cmp dword [esp + 4], 0
mov esi, edi
je 0x40614d
lea eax, [esp + 0xa0]
mov edi, dword [esp + 0xc]
push edi
push eax
push ebx
push esi
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, edi
jne 0x406187
add esi, edi
adc ebx, 0
mov dword [esp], ebx
jmp 0x406158
push dword [esp + 0x10]
jmp 0x4061e3
mov dword [esp], ebx
mov dword [esp + 4], 0
mov ebx, dword [ebp + 0x38]
test ebx, ebx
je 0x406196
push ebx
push dword [ebp + 0x34]
mov edi, dword [esp + 8]
push edi
push esi
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x406187
add esi, ebx
mov dword [esp + 0x14], esi
adc edi, 0
mov dword [esp], edi
jmp 0x40619a
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x13
jmp 0x405b62
mov dword [esp + 0x14], esi
cmp dword [esp + 8], 0
je 0x4061f8
mov esi, dword [ebp + 0x14]
push esi
push dword [ebp + 0x10]
push dword [esp + 8]
push dword [esp + 0x20]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x4061dc
mov eax, dword [ebp + 0x14]
add dword [esp + 0x14], eax
adc dword [esp], 0
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], 0
jmp 0x4062bb
push dword [esp + 0x10]
mov esi, dword [ebp + 8]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x405b62
cmp dword [ebp + 0x14], 0
je 0x4062bb
mov eax, dword [ebp + 8]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x50], eax
mov eax, dword [esp]
mov dword [esp + 0x54], eax
mov dword [esp + 0x5c], 0
mov dword [esp + 0x58], 0
mov eax, dword [esp + 0x20]
mov ecx, eax
cmp eax, 0xa
jl 0x406238
mov ecx, 0xa
xor eax, eax
mov edx, dword [esp + 0x20]
cmp edx, 4
setl al
shl eax, 0xe
or eax, dword [ecx*4 + 0x43da58]
test edx, edx
jne 0x406257
or eax, 0x80000
lea ecx, [esp + 0x48]
push eax
push ecx
push 0x4066d0
mov esi, dword [esp + 0x1c]
push esi
call fcn.00404ca0
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.00403810
add esp, 0x18
cmp eax, 1
jne 0x4063cd
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x54]
mov dword [esp], eax
push dword [esp + 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x2c]
add esp, 8
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
mov esi, ecx
mov dword [esp + 8], eax
or ecx, eax
je 0x4064d2
mov dword [esp + 0x48], 0x8074b50
mov edx, dword [esp + 0x88]
mov byte [esp + 0x4c], dl
mov byte [esp + 0x4d], dh
mov ecx, edx
shr ecx, 0x10
mov byte [esp + 0x4e], cl
mov ecx, edx
shr ecx, 0x18
mov byte [esp + 0x4f], cl
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
cmp dword [esp + 4], 0
je 0x4063ba
mov byte [esp + 0x50], cl
mov byte [esp + 0x51], ch
mov ebx, ecx
shr ebx, 0x10
mov byte [esp + 0x52], bl
mov ebx, edx
shr ebx, 0x10
shr ecx, 0x18
mov byte [esp + 0x53], cl
mov ecx, edx
shr ecx, 0x18
mov byte [esp + 0x54], dl
mov byte [esp + 0x55], dh
mov byte [esp + 0x56], bl
mov byte [esp + 0x57], cl
mov edx, esi
mov byte [esp + 0x58], dl
mov byte [esp + 0x59], dh
mov ecx, esi
shr ecx, 0x10
mov byte [esp + 0x5a], cl
mov ecx, esi
shr ecx, 0x18
mov byte [esp + 0x5b], cl
mov dword [esp + 0x38], 0x38
mov dword [esp + 0x90], 0x30
mov ecx, 0x28
mov dword [esp + 0x20], 0x18
mov dword [esp + 0x10], 0x17
mov eax, dword [esp + 8]
mov edx, eax
mov byte [esp + 0x1b], al
mov dword [esp + 0x94], 0x16
mov dword [esp + 0x8c], 0x15
mov edi, 0x14
jmp 0x406436
test edx, edx
je 0x4063e9
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x405b62
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 0x405b62
mov dword [esp + 0x50], ecx
mov dword [esp + 0x38], 0x18
mov dword [esp + 0x90], 0x10
mov ecx, 8
mov dword [esp + 0x10], 0xf
mov dword [esp + 0x94], 0xe
mov edx, esi
mov byte [esp + 0x1b], dl
mov dword [esp + 0x8c], 0xd
mov edi, 0xc
mov dword [esp + 0x20], 0x10
mov edx, esi
mov ebx, dword [esp + 8]
shrd edx, ebx, cl
shr ebx, cl
movzx eax, byte [esp + 0x1b]
mov byte [esp + edi + 0x48], al
test cl, 0x20
jne 0x406451
mov ebx, edx
mov edx, esi
mov ecx, dword [esp + 0x90]
mov eax, dword [esp + 8]
shrd edx, eax, cl
mov edi, dword [esp + 0x8c]
mov byte [esp + edi + 0x48], bl
mov ebx, eax
shr ebx, cl
test cl, 0x20
jne 0x406477
mov ebx, edx
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 8]
shrd esi, eax, cl
mov edx, esi
mov esi, dword [esp + 0x94]
mov byte [esp + esi + 0x48], bl
shr eax, cl
test cl, 0x20
jne 0x406498
mov eax, edx
mov ecx, dword [esp + 0x10]
mov byte [esp + ecx + 0x48], al
lea eax, [esp + 0x48]
mov esi, dword [esp + 0x20]
push esi
push eax
push dword [esp + 8]
push dword [esp + 0x20]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x405b62
mov eax, dword [esp + 0x20]
add dword [esp + 0x14], eax
adc dword [esp], 0
cmp dword [esp + 4], 0
je 0x40652c
xor edx, edx
mov ecx, 0xfffffffe
cmp ecx, dword [esp + 0x28]
mov eax, 0
sbb eax, dword [esp + 0x2c]
jb 0x4064f3
xor eax, eax
jmp 0x4064f7
lea eax, [esp + 0x28]
cmp ecx, dword [esp + 0x30]
mov ecx, 0
sbb ecx, dword [esp + 0x34]
jb 0x40650d
mov edi, 0
jmp 0x406511
lea edi, [esp + 0x40]
jae 0x406517
lea edx, [esp + 0x30]
lea ecx, [esp + 0xa0]
push eax
push edi
call fcn.00406660
add esp, 8
mov dword [esp + 0xc], eax
movzx ebx, word [esp + 0x84]
movzx esi, word [esp + 0x3c]
movzx eax, word [esp + 0xc]
movzx edi, word [esp + 0x24]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
push dword [ebp + 0x40]
push dword [ebp + 0x3c]
push dword [esp + 0x24]
push dword [esp + 0x38]
push dword [esp + 0x38]
push 0
push 0
push ebx
push esi
push dword [esp + 0xac]
push dword [esp + 0x6c]
push dword [esp + 0x6c]
push dword [esp + 0x64]
push dword [esp + 0x64]
push dword [esp + 0xd0]
push dword [ebp + 0x18]
push eax
push dword [esp + 0x48]
push edi
call fcn.00406720
add esp, 0x4c
test eax, eax
je 0x405b62
mov eax, dword [ebp + 8]
inc dword [eax + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [eax], ecx
mov ecx, dword [esp]
mov dword [eax + 4], ecx
mov eax, 1
jmp 0x405b64