Function at 0x405940
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 ebx, dword [ebp + 0x24]
mov esi, dword [ebp + 0x28]
mov edx, dword [ebp + 8]
mov dword [esp + 0x34], esi
mov dword [esp + 0x30], ebx
mov eax, dword [edx]
mov ecx, dword [edx + 4]
mov dword [esp + 0x10], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], 0
mov eax, dword [ebp + 0x20]
mov edi, 6
test eax, eax
js 0x405993
mov edi, eax
mov ecx, dword [ebp + 0x14]
mov eax, ebx
or eax, esi
je 0x4059a2
mov cx, 8
jmp 0x4059bb
test ecx, ecx
je 0x4059b9
mov eax, edi
xor eax, 0xfffffbff
mov ecx, edi
or ecx, 0x400
test ecx, eax
je 0x40599c
xor ecx, ecx
test edi, 0x10000
mov dword [esp + 4], esi
jne 0x4059d0
movzx ecx, cx
or ecx, 0x800
mov esi, edi
mov eax, edi
and eax, 0xf
sete byte [esp + 0x20]
mov edi, dword [edx + 0x48]
mov dword [esp + 8], edi
test edi, edi
je 0x405aa8
cmp dword [edx + 0x14], 2
jne 0x405aa8
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0xc]
cmp dword [ebp + 0x14], 0
je 0x405a19
test eax, eax
mov eax, dword [esp + 0x1c]
je 0x405aa8
cmp dword [ebp + 0x10], 0
jne 0x405a25
jmp 0x405aa8
test eax, eax
mov eax, dword [esp + 0x1c]
je 0x405aa8
cmp word [ebp + 0x1c], 0
je 0x405a39
cmp dword [ebp + 0x18], 0
je 0x405aa8
cmp eax, 0xa
jbe 0x405a3e
jmp 0x405aa8
cmp eax, 0xb
jae 0x405aa8
mov eax, dword [esp + 8]
mov edi, dword [eax + 0x34]
mov eax, dword [edx + 0x10]
test edi, edi
je 0x405a60
mov dword [esp + 0xc], edi
cmp eax, 0xffffffff
mov edi, esi
jne 0x405a8b
mov dword [edx + 0x1c], 2
jmp 0x405aaf
cmp dword [esp + 4], 0
mov edi, esi
jne 0x405a78
mov dword [esp + 0xc], 0
cmp eax, 0xffff
jne 0x405a8b
mov eax, dword [esp + 8]
mov dword [eax + 0x34], 1
mov dword [esp + 0xc], 1
mov eax, edi
shr eax, 0xa
and eax, 1
or byte [esp + 0x20], al
test edi, 0x400
jne 0x405ab9
or ebx, dword [esp + 4]
mov eax, dword [ebp + 0xc]
je 0x405ad5
mov dword [edx + 0x1c], 0x18
xor eax, eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x2f
mov esi, dword [esp + 4]
je 0x405ada
mov dword [esp + 0x54], ecx
mov ecx, dword [ebp + 0x2c]
mov dword [esp + 0x90], ecx
jmp 0x405b29
cmp byte [eax], 0x2f
jne 0x405ae3
mov dword [edx + 0x1c], 0x19
jmp 0x405aaf
mov dword [esp + 0x54], ecx
mov ebx, dword [ebp + 0x14]
push ebx
push dword [ebp + 0x10]
push 0
call fcn.00403660
add esp, 0xc
mov dword [esp + 0x90], eax
xor esi, esi
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], 0
mov eax, 0
cmp ebx, 4
setb cl
jb 0x405b1e
mov eax, dword [esp + 0x1c]
or byte [esp + 0x20], cl
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0xc]
push eax
call fcn.00408df0
add esp, 4
cmp eax, 0x10000
jb 0x405b48
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x19
jmp 0x405aaf
mov dword [esp + 0x14], edi
mov dword [esp + 4], esi
mov dword [esp + 0x38], eax
mov dword [esp + 0x50], 0
mov esi, 0xfffffffe
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x20]
mov ecx, dword [edx + 0x24]
or ecx, eax
mov ecx, 0
je 0x405b81
lea ecx, [esi + eax]
inc ecx
mov edx, dword [edx]
and edx, ecx
sub eax, edx
and eax, ecx
mov ecx, eax
mov dword [esp + 0x48], ecx
mov eax, dword [esp + 8]
mov ecx, dword [eax + 4]
lea eax, [ecx + ecx]
and eax, 0x5c
mov dword [esp + 0x24], ecx
xor ecx, 0x2e
movzx edi, word [ebp + 0x1c]
xor edx, edx
mov esi, dword [esp + 0x38]
mov dword [esp + 0x98], edi
add esi, edi
setb dl
mov dword [esp + 0x4c], esi
add ecx, esi
mov esi, edx
adc edx, 0
add ecx, eax
adc edx, 0
add ecx, 0x1c
adc edx, 0
mov eax, 0xfffffffe
cmp eax, ecx
sbb dword [esp + 0x50], edx
jae 0x405be1
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0xf
jmp 0x405aaf
cmp dword [esp + 0xc], 0
mov edx, dword [ebp + 8]
jne 0x405c58
xor ecx, ecx
mov eax, dword [esp + 0x38]
add eax, dword [esp + 0x48]
setb cl
add eax, dword [edx]
adc ecx, dword [edx + 4]
add eax, 0x1e
adc ecx, 0
mov dword [esp + 0xc], ecx
lea edi, [eax + eax]
and edi, 0x5c
xor eax, 0x2e
mov ecx, dword [esp + 0x4c]
add ecx, dword [ebp + 0x38]
adc esi, 0
add ecx, dword [ebp + 0x40]
adc esi, 0
add ecx, dword [esp + 0x24]
adc esi, 0
add ecx, eax
adc esi, dword [esp + 0xc]
add ecx, edi
adc esi, 0
add ecx, 0x26
adc esi, 0xffffffff
mov dword [esp + 0xc], 0
cmp esi, 0xffffffff
je 0x405c58
mov eax, dword [esp + 8]
mov dword [eax + 0x34], 1
mov dword [esp + 0xc], 1
mov ecx, dword [esp + 0x38]
test ecx, ecx
mov esi, dword [esp + 4]
mov edi, dword [esp + 0x14]
je 0x405c96
mov dword [esp + 0x50], 0
mov eax, dword [ebp + 0xc]
cmp byte [ecx + eax - 1], 0x2f
mov ecx, dword [ebp + 0x14]
jne 0x405ca1
test ecx, ecx
jne 0x405aa8
mov dword [esp + 0x50], 0x10
or ebx, esi
je 0x405ca1
jmp 0x405aa8
mov dword [esp + 0x50], 0
mov ecx, dword [ebp + 0x14]
mov eax, dword [esp + 0xc]
test eax, eax
je 0x405cae
mov eax, 0x1c
mov edx, dword [esp + 0x4c]
add edx, dword [esp + 0x24]
add eax, edx
add eax, 0x2e
mov ebx, dword [esp + 8]
mov edx, dword [ebx + 8]
cmp edx, eax
jae 0x405d03
mov ecx, 1
test edx, edx
je 0x405cd1
mov ecx, edx
mov esi, ecx
add ecx, ecx
cmp esi, eax
jb 0x405cd1
push esi
push dword [ebx + 0xc]
push dword [ebx]
mov edi, ebx
mov ebx, dword [ebp + 8]
push dword [ebx + 0x34]
call dword [ebx + 0x30]
add esp, 0x10
test eax, eax
je 0x405e70
mov dword [edi], eax
mov dword [edi + 8], esi
mov ecx, dword [ebp + 0x14]
mov ebx, edi
mov edi, dword [esp + 0x14]
mov eax, dword [ebx + 0x14]
mov edx, dword [ebx + 0x18]
inc eax
cmp edx, eax
jae 0x405d4b
mov ecx, 1
test edx, edx
je 0x405d19
mov ecx, edx
mov esi, ecx
add ecx, ecx
cmp esi, eax
jb 0x405d19
push esi
push dword [ebx + 0x1c]
push dword [ebx + 0x10]
mov edi, ebx
mov ebx, dword [ebp + 8]
push dword [ebx + 0x34]
call dword [ebx + 0x30]
add esp, 0x10
test eax, eax
je 0x405e70
mov dword [edi + 0x10], eax
mov dword [edi + 0x18], esi
mov ecx, dword [ebp + 0x14]
mov edi, dword [esp + 0x14]
test ecx, ecx
sete cl
xor eax, eax
or cl, byte [esp + 0x20]
jne 0x405d73
push 0x4df40
push 1
mov eax, dword [ebp + 8]
push dword [eax + 0x34]
call dword [eax + 0x28]
add esp, 0xc
test eax, eax
je 0x405ec6
mov dword [esp + 4], eax
mov ecx, dword [ebp + 8]
mov ebx, dword [esp + 0x10]
mov edx, ebx
mov esi, dword [esp + 0x48]
push esi
push dword [esp + 0x40]
call fcn.00406580
add esp, 8
test eax, eax
je 0x405e7c
test edi, 0x400
sete al
mov edi, dword [esp + 0x28]
add edi, esi
mov ecx, dword [esp + 0x2c]
adc ecx, 0
mov edx, ebx
and edx, esi
xor ebx, esi
mov esi, edx
shr esi, 0x1f
add edx, edx
add ebx, edx
adc esi, dword [esp + 0x3c]
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], ecx
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 dword [esp + 0x88], 0
mov word [esp + 0x8c], 0
and al, byte [esp + 0x20]
mov byte [esp + 0xc], al
mov edx, eax
xor dl, 1
movzx edx, dl
shl edx, 3
mov dword [esp + 0x3c], edx
mov eax, dword [esp + 8]
cmp dword [eax + 0x34], 0
je 0x405e91
mov dword [esp + 8], esi
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x30]
mov esi, dword [esp + 0x34]
mov eax, 0xfffffffe
cmp eax, ebx
mov edx, 0
sbb edx, esi
jb 0x405ed5
xor edx, edx
cmp eax, edi
sbb edx, ecx
jb 0x405ed5
mov dword [esp + 0x14], 0
mov ebx, dword [ebp + 0x38]
xor eax, eax
jmp 0x405f2b
mov dword [ebx + 0x1c], 0x10
jmp 0x405aaf
push dword [esp + 4]
mov edi, dword [ebp + 8]
push dword [edi + 0x34]
call dword [edi + 0x2c]
add esp, 8
jmp 0x405aaf
cmp dword [esp + 0x44], 0
jne 0x4063ab
test esi, esi
jne 0x4063ab
mov dword [esp + 8], esi
mov dword [esp + 0x70], 0x4034b50
cmp byte [esp + 0xc], 0
mov dword [esp + 0x10], ebx
jne 0x40603f
mov dl, 0x14
jmp 0x406041
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x10
jmp 0x405aaf
xor edx, edx
cmp eax, edi
mov eax, 0
sbb eax, ecx
jb 0x405ee6
xor eax, eax
jmp 0x405eea
lea eax, [esp + 0x28]
mov ecx, 0xfffffffe
cmp ecx, ebx
mov ecx, 0
sbb ecx, esi
mov ebx, dword [ebp + 0x38]
jb 0x405f04
mov esi, 0
jmp 0x405f08
lea esi, [esp + 0x40]
jae 0x405f0e
lea edx, [esp + 0x30]
lea ecx, [esp + 0xa0]
mov dword [esp + 0x14], ecx
push eax
push esi
call fcn.00406630
add esp, 8
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
lea edx, [eax + ebx]
mov dword [esp + 0x70], 0x4034b50
cmp byte [esp + 0xc], 0
mov dword [esp + 0x24], eax
jne 0x405f45
mov bl, 0x14
jmp 0x405f47
xor ebx, ebx
mov byte [esp + 0x74], bl
mov byte [esp + 0x75], 0
movzx ebx, word [esp + 0x54]
mov byte [esp + 0x76], bl
mov byte [esp + 0x77], bh
mov ebx, dword [esp + 0x3c]
mov byte [esp + 0x78], bl
mov dword [esp + 0x79], 0
mov dword [esp + 0x7d], 0
mov dword [esp + 0x81], 0
mov dword [esp + 0x85], 0
mov byte [esp + 0x89], 0
mov ebx, dword [esp + 0x38]
mov byte [esp + 0x8a], bl
mov byte [esp + 0x8b], bh
mov byte [esp + 0x8c], dl
mov byte [esp + 0x8d], dh
lea edx, [esp + 0x70]
push 0x1e
push edx
push ecx
push edi
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x40611b
mov edi, dword [esp + 0x10]
add edi, 0x1e
mov eax, dword [esp + 8]
adc eax, 0
push ebx
push dword [ebp + 0xc]
mov dword [esp + 0x10], eax
push eax
push edi
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x40610e
add edi, ebx
mov ecx, dword [esp + 8]
adc ecx, 0
cmp dword [esp + 0x14], 0
mov esi, edi
je 0x406127
lea eax, [esp + 0xa0]
mov ebx, dword [esp + 0x24]
push ebx
push eax
push ecx
push esi
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
mov edi, ecx
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x406198
add esi, ebx
adc edi, 0
jmp 0x406109
xor edx, edx
mov byte [esp + 0x74], dl
mov ebx, dword [esp + 0x54]
movzx edx, bx
mov dword [esp + 0x54], ebx
mov byte [esp + 0x76], bl
mov byte [esp + 0x77], dh
mov edx, dword [esp + 0x3c]
mov byte [esp + 0x78], dl
mov dword [esp + 0x79], 0
mov dword [esp + 0x7d], 0
mov dword [esp + 0x81], 0
mov dword [esp + 0x85], 0
mov byte [esp + 0x89], 0
mov ebx, dword [esp + 0x38]
mov byte [esp + 0x8a], bl
mov byte [esp + 0x8b], bh
mov edx, dword [ebp + 0x38]
mov byte [esp + 0x8c], dl
mov byte [esp + 0x8d], dh
lea edx, [esp + 0x70]
push 0x1e
push edx
push ecx
push edi
mov esi, dword [ebp + 8]
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, 0x1e
jne 0x40611b
mov eax, dword [esp + 0x10]
add eax, 0x1e
mov edi, dword [esp + 8]
adc edi, 0
push ebx
push dword [ebp + 0xc]
push edi
mov dword [esp + 0x1c], eax
push eax
push dword [esi + 0x44]
call dword [esi + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x40610e
mov esi, dword [esp + 0x10]
add esi, ebx
adc edi, 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x14], 0
mov eax, dword [ebp + 8]
jmp 0x406134
push dword [esp + 4]
push dword [esi + 0x34]
call dword [esi + 0x2c]
add esp, 8
mov dword [esi + 0x1c], 0x13
jmp 0x405aaf
mov dword [esp + 0x14], 0
mov eax, dword [ebp + 8]
mov edi, ecx
mov ebx, dword [ebp + 0x38]
test ebx, ebx
je 0x406153
push ebx
push dword [ebp + 0x34]
push edi
push esi
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, ebx
jne 0x406198
add esi, ebx
adc edi, 0
mov eax, dword [ebp + 0x14]
cmp byte [esp + 0x20], 0
je 0x4061a7
push eax
push dword [ebp + 0x10]
push edi
push esi
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
mov ecx, dword [ebp + 0x14]
add esp, 0x14
cmp eax, ecx
jne 0x40627e
add esi, ecx
mov dword [esp + 0x10], esi
adc edi, 0
mov dword [esp + 8], edi
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], 0
jmp 0x406292
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x13
jmp 0x405aaf
test eax, eax
je 0x40628a
mov eax, dword [ebp + 8]
mov dword [esp + 0x58], eax
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], edi
mov dword [esp + 0x6c], 0
mov dword [esp + 0x68], 0
mov ecx, dword [esp + 0x1c]
mov eax, ecx
cmp ecx, 0xa
jl 0x4061de
mov eax, 0xa
mov ecx, dword [eax*4 + 0x43ba58]
xor eax, eax
mov esi, dword [esp + 0x1c]
cmp esi, 4
setge al
neg eax
or eax, 0xffffbfff
mov edx, eax
and edx, 0x4000
xor edx, ecx
xor edx, 0x4000
not eax
and eax, ecx
or eax, edx
test esi, esi
jne 0x406217
or eax, 0x80000
lea ecx, [esp + 0x58]
push eax
push ecx
push 0x4066a0
mov esi, dword [esp + 0x10]
push esi
call fcn.00404c80
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.00403740
add esp, 0x18
cmp eax, 1
jne 0x40638b
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 8], eax
jmp 0x406292
push dword [esp + 4]
mov esi, dword [ebp + 8]
jmp 0x406112
mov dword [esp + 8], edi
mov dword [esp + 0x10], esi
push dword [esp + 4]
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 edi, ecx
mov dword [esp + 4], eax
or ecx, eax
je 0x406498
mov dword [esp + 0x58], 0x8074b50
mov edx, dword [esp + 0x90]
mov byte [esp + 0x5c], dl
mov byte [esp + 0x5d], dh
mov ecx, edx
shr ecx, 0x10
mov byte [esp + 0x5e], cl
mov ecx, edx
shr ecx, 0x18
mov byte [esp + 0x5f], cl
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
cmp dword [esp + 0x14], 0
je 0x4063a7
mov byte [esp + 0x60], cl
mov byte [esp + 0x61], ch
mov ebx, ecx
shr ebx, 0x10
mov byte [esp + 0x62], bl
mov ebx, edx
shr ebx, 0x10
shr ecx, 0x18
mov byte [esp + 0x63], cl
mov ecx, edx
shr ecx, 0x18
mov byte [esp + 0x64], dl
mov byte [esp + 0x65], dh
mov byte [esp + 0x66], bl
mov byte [esp + 0x67], cl
mov edx, edi
mov byte [esp + 0x68], dl
mov byte [esp + 0x69], dh
mov ecx, edi
shr ecx, 0x10
mov byte [esp + 0x6a], cl
mov ecx, edi
shr ecx, 0x18
mov byte [esp + 0x6b], cl
mov dword [esp + 0xc], 0x38
mov dword [esp + 0x48], 0x30
mov ecx, 0x28
mov dword [esp + 0x20], 0x18
mov dword [esp + 0x1c], 0x17
mov eax, dword [esp + 4]
mov edx, eax
mov byte [esp + 0x1b], al
mov dword [esp + 0x4c], 0x16
mov dword [esp + 0x94], 0x15
mov esi, 0x14
jmp 0x406401
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 0x405aaf
test edx, edx
je 0x4063ba
mov eax, dword [ebp + 8]
mov dword [eax + 0x1c], 0x1d
jmp 0x405aaf
mov dword [esp + 0x60], ecx
mov dword [esp + 0xc], 0x18
mov dword [esp + 0x48], 0x10
mov ecx, 8
mov dword [esp + 0x1c], 0xf
mov dword [esp + 0x4c], 0xe
mov edx, edi
mov byte [esp + 0x1b], dl
mov dword [esp + 0x94], 0xd
mov esi, 0xc
mov dword [esp + 0x20], 0x10
mov edx, edi
mov ebx, dword [esp + 4]
shrd edx, ebx, cl
shr ebx, cl
movzx eax, byte [esp + 0x1b]
mov byte [esp + esi + 0x58], al
test cl, 0x20
jne 0x40641c
mov ebx, edx
mov edx, edi
mov ecx, dword [esp + 0x48]
mov eax, dword [esp + 4]
shrd edx, eax, cl
mov esi, dword [esp + 0x94]
mov byte [esp + esi + 0x58], bl
mov ebx, eax
shr ebx, cl
test cl, 0x20
jne 0x40643f
mov ebx, edx
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 4]
shrd edi, eax, cl
mov esi, dword [esp + 0x4c]
mov byte [esp + esi + 0x58], bl
shr eax, cl
test cl, 0x20
jne 0x40645d
mov edx, edi
mov eax, edi
mov ecx, dword [esp + 0x1c]
mov byte [esp + ecx + 0x58], al
lea eax, [esp + 0x58]
mov esi, dword [esp + 0x20]
push esi
push eax
push dword [esp + 0x10]
push dword [esp + 0x1c]
mov eax, dword [ebp + 8]
push dword [eax + 0x44]
call dword [eax + 0x3c]
add esp, 0x14
cmp eax, esi
jne 0x405aaf
mov eax, dword [esp + 0x20]
add dword [esp + 0x10], eax
adc dword [esp + 8], 0
cmp dword [esp + 0x14], 0
je 0x4064f7
xor edx, edx
mov eax, 0xfffffffe
cmp eax, dword [esp + 0x28]
mov eax, 0
sbb eax, dword [esp + 0x2c]
jb 0x4064b9
xor eax, eax
jmp 0x4064bd
lea eax, [esp + 0x28]
mov ecx, 0xfffffffe
cmp ecx, dword [esp + 0x30]
mov ecx, 0
sbb ecx, dword [esp + 0x34]
jb 0x4064d8
mov esi, 0
jmp 0x4064dc
lea esi, [esp + 0x40]
jae 0x4064e2
lea edx, [esp + 0x30]
lea ecx, [esp + 0xa0]
push eax
push esi
call fcn.00406630
add esp, 8
mov dword [esp + 0x24], eax
movzx ebx, word [esp + 0x54]
movzx esi, word [esp + 0x3c]
movzx eax, word [esp + 0x24]
movzx edi, word [esp + 0x38]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
push dword [ebp + 0x40]
push dword [ebp + 0x3c]
push dword [esp + 0x58]
push dword [esp + 0x38]
push dword [esp + 0x38]
push 0
push 0
push ebx
push esi
push dword [esp + 0xb4]
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 + 0x58]
push edi
call fcn.004066f0
add esp, 0x4c
test eax, eax
je 0x405aaf
mov eax, dword [ebp + 8]
inc dword [eax + 0x10]
mov ecx, dword [esp + 0x10]
mov dword [eax], ecx
mov ecx, dword [esp + 8]
mov dword [eax + 4], ecx
mov eax, 1
jmp 0x405ab1