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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x2e4
mov esi, dword [esp + 0x2fc]
cmp byte [esp + 0x2f8], 0
mov ebx, edx
mov ebp, ecx
je 0x4096a5
lea eax, [esi + 0x48]
lea ecx, [esp + 0x1e4]
push 0x100
push eax
push ecx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
jmp 0x4096b1
lea ecx, [esp + 0x1e4]
call fcn.00410e33
mov dword [esp], ebx
test bl, bl
mov ebx, dword [esi + 8]
jne 0x4096e5
mov ecx, ebx
mov edx, 0x5a7064
lea esi, [ebx + ebx]
not ecx
shr ecx, 0x1f
call fcn.004ac869
xor ecx, ecx
cmp esi, 4
mov edx, 0x5a7074
lea ebx, [ebx + ebx - 4]
setae cl
call fcn.004ac869
movzx esi, byte [esp + 0x2e3]
bsr ecx, esi
xor eax, eax
mov dword [esp + 0x14], esi
dec eax
not ecx
shr eax, cl
lea edx, [eax + 1]
not eax
bsf ecx, edx
and eax, edx
xor edx, edx
inc edx
test esi, esi
cmove ecx, esi
mov esi, ebx
cmove eax, edx
mov dword [esp + 0x10], edx
mov edx, 0x5a7084
mov dword [esp + 0x18], ecx
shl esi, cl
xor ecx, ecx
mov edi, esi
sub edi, eax
setae cl
call fcn.004ac869
cmp edi, 0x7ffffffe
jbe 0x40975c
and dword [ebp + 8], 0
mov dword [ebp + 0xc], edi
and dword [ebp + 0x14], 0
mov dword [ebp + 0x10], 0x7ffffffe
and dword [ebp + 0x1c], 0
mov dword [ebp + 0x18], edi
mov dword [ebp], 1
jmp 0x40a065
mov eax, dword [esp + 0x2fc]
mov dword [esp + 0xc], ebx
xor ecx, ecx
mov ebx, dword [eax + 0x154]
add ebx, 0xffffffff
setb cl
cmp byte [esp], 0
je 0x409782
mov edx, 0x5a70b4
jmp 0x40979a
mov edx, 0x5a7094
call fcn.004ac869
mov ecx, ebx
add ebx, ebx
mov edx, 0x5a70a4
not ecx
shr ecx, 0x1f
call fcn.004ac869
lea ecx, [esp + 0x70]
mov edx, esi
call fcn.00408725
test ebx, ebx
mov dword [esp + 0x6c], ebp
je 0x4097e3
cmp ebx, 0xaaaaaaa
ja 0x40a070
imul edi, ebx, 0xc
test edi, edi
js 0x40a070
push 4
pop ecx
mov edx, edi
call fcn.0040764b
mov ebp, eax
test eax, eax
jne 0x4097e6
push 4
pop ecx
mov edx, edi
call fcn.0059eab0
push 4
pop ebp
xor esi, esi
mov dword [esp + 8], ebp
lea edi, [esi + 1]
cmp edi, ebx
jae 0x409823
lea ecx, [esp + 0x88]
push 4
pop edx
push 0
call fcn.004085a2
pop eax
mov eax, dword [esp + 0x90]
inc esi
mov dword [ebp + 8], eax
movsd xmm0, qword [esp + 0x88]
movsd qword [ebp], xmm0
add ebp, 0xc
jmp 0x4097ec
test ebx, ebx
je 0x409838
and dword [ebp], 0
mov dword [ebp + 4], 4
and dword [ebp + 8], 0
jmp 0x409844
push 4
pop edx
xor ecx, ecx
call fcn.0045e992
mov edi, esi
mov esi, dword [esp + 0x2fc]
lea ecx, [esp + 0x44]
mov edx, dword [esi + 0x34]
push dword [esi + 0x38]
call fcn.004085a2
pop eax
mov eax, dword [esi + 0x3c]
test eax, eax
mov dword [esp + 0x20], eax
je 0x409886
lock inc dword [eax]
jle 0x40a075
mov esi, dword [esp + 0x2fc]
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0x44]
mov dword [esp + 0x40], eax
mov dword [esp + 0x68], ecx
jmp 0x40988d
mov esi, dword [esp + 0x2fc]
mov al, byte [esi + 0x160]
inc dword [esp + 0x14]
lea ebp, [esp + 0xc8]
mov byte [esp + 0x1c], al
lea eax, [esp + 0x1e4]
push 0x100
push eax
push ebp
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [esp + 0x78]
and dword [ebp + 0x10c], 0
and dword [ebp + 0x108], 0
and dword [ebp + 0x114], 0
and dword [ebp + 0x110], 0
movsd xmm0, qword [esp + 0x70]
mov ecx, dword [esp + 0x18]
mov dword [ebp - 0x38], eax
mov eax, dword [esp + 8]
movsd qword [ebp - 0x40], xmm0
mov dword [ebp - 0x34], ebx
movsd xmm0, qword [esp + 0x44]
mov ebx, dword [esp + 0xc]
mov dword [ebp - 0x30], eax
mov eax, dword [esp + 0x4c]
mov dword [ebp - 0x2c], edi
lea edi, [esp + 0xa0]
and dword [ebp - 0x1c], 0
movsd qword [edi], xmm0
mov dword [edi + 8], eax
mov eax, dword [esp + 0x20]
mov dword [edi + 0x10], eax
mov eax, dword [esp + 0x40]
mov dword [edi + 0x14], eax
mov eax, dword [esp + 0x68]
mov dword [edi + 0x18], eax
mov al, byte [esp + 0x1c]
mov byte [edi + 0x140], al
mov eax, dword [esp + 0x14]
mov dword [edi + 0x1c], ebx
mov dword [edi + 0x20], eax
mov eax, dword [esi + 0x148]
mov dword [edi + 0x24], ecx
mov dword [edi + 0x128], eax
mov eax, dword [esi + 0x14c]
mov dword [edi + 0x12c], eax
mov eax, dword [esp]
cmp al, 2
je 0x409977
movzx eax, al
cmp eax, 1
lea eax, [esp + 0x88]
jne 0x40998f
xor ecx, ecx
mov edx, esi
jmp 0x409983
xor ecx, ecx
mov edx, esi
lea eax, [esp + 0x88]
inc ecx
push eax
call fcn.004110a8
pop eax
jmp 0x409fe2
mov edi, dword [esi + 4]
mov ebp, esi
mov esi, dword [esi + 8]
mov ecx, dword [esp + 0x18]
shl dword [esp + 0x10], cl
lea ecx, [esp + 0x28]
mov edx, esi
call fcn.00408725
lea ecx, [esp + 0x34]
mov edx, esi
call fcn.00408725
mov ecx, ebx
call fcn.004086f3
mov dword [esp + 0x40], eax
lea eax, [esp + 4]
imul ebx, esi, 0x14
mov ecx, esi
mov dword [esp + 8], edx
and dword [eax], 0
add ebx, edi
call fcn.0040abc6
lea eax, [esp + 0x70]
mov edx, dword [ebp + 0x158]
mov ecx, dword [ebp + 0x15c]
mov dword [eax], edi
mov dword [eax + 4], ebx
and dword [eax + 8], 0
mov ebx, eax
mov dword [eax + 0xc], esi
mov dword [esp + 0x20], edx
mov dword [esp + 0x1c], ecx
mov ecx, ebx
call fcn.0040ac03
test edx, edx
je 0x409e40
mov edi, eax
cmp eax, 2
jae 0x409a53
mov esi, dword [esp + 4]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
push 0x5a7204
push edi
call fcn.00454a95
pop ecx
pop edx
mov dword [eax], esi
mov esi, dword [esp + 4]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
push 0x5a7214
push edi
call fcn.00454a95
pop ecx
pop edx
mov ecx, dword [esp + 0x10]
mov dword [eax], esi
add dword [esp + 4], ecx
jmp 0x4099fd
mov eax, dword [esp + 0x20]
mov esi, edx
cmp edi, eax
jne 0x409a94
mov ebx, dword [esp + 4]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
push 0x5a71e4
push eax
mov ebp, eax
call fcn.00454a95
pop ecx
pop edx
mov dword [eax], ebx
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
push 0x5a71f4
push ebp
call fcn.00454a95
pop ecx
pop edx
and dword [eax], 0
jmp 0x409af7
mov eax, dword [esp + 0x1c]
cmp edi, eax
jne 0x409c3f
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
push 0x5a71b4
push eax
mov ebp, eax
call fcn.00454a95
pop ecx
pop edx
and dword [eax], 0
mov ebx, dword [esp + 4]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
push 0x5a71c4
push ebp
call fcn.00454a95
pop ecx
pop edx
mov dword [eax], ebx
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 4]
shr eax, cl
mov ecx, dword [esp + 8]
push 0x5a71d4
push eax
call fcn.0045f718
pop ecx
pop edx
mov byte [eax], 1
cmp dword [esi + 8], 0
mov ebp, dword [esp + 0x2fc]
je 0x409b25
mov esi, dword [esp + 4]
mov ecx, ebp
mov edx, edi
call fcn.0040acc0
mov ebx, edx
lea ecx, [esp + 0x88]
mov edx, esi
push ebx
push eax
call fcn.00410fad
pop eax
pop ecx
mov ecx, ebp
mov edx, edi
call fcn.0040ac61
xor esi, esi
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], edx
mov dword [esp], 0
lea ecx, [esp + 0x44]
lea edx, [esp + 0x58]
call fcn.0040ac7f
cmp byte [esp + 0x44], 0
je 0x409bdb
movzx edi, byte [esp + 0x45]
mov ebp, dword [esp + 0x46]
mov ecx, dword [esp]
mov edx, esi
cmp edx, edi
jae 0x409ba1
movzx eax, dl
inc edx
test cl, cl
mov cl, 1
mov bl, byte [esp + eax + 0xc8]
je 0x409b7e
cmp bh, bl
je 0x409b65
mov esi, edx
lea ecx, [esp + 0x88]
lea edx, [esp + 4]
movzx eax, bl
push 1
push eax
call fcn.0041106e
mov edx, esi
mov cl, 1
add esp, 8
mov bh, bl
jmp 0x409b65
mov bl, byte [esp + edi + 0xc8]
test cl, cl
je 0x409bb0
cmp bh, bl
je 0x409bce
mov esi, edx
lea edx, [esp + 4]
movzx eax, bl
lea ecx, [esp + 0x88]
push ebp
push eax
call fcn.0041106e
mov edx, esi
add esp, 8
mov bh, bl
inc edx
mov al, 1
mov esi, edx
mov dword [esp], eax
jmp 0x409b3f
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], 0xff
mov byte [esp + 0x4c], 0
lea ecx, [esp + 0x44]
call fcn.00408353
test eax, eax
je 0x409c2e
movzx eax, dl
cmp byte [esp], 0
mov bl, byte [esp + eax + 0xc8]
mov al, 1
mov dword [esp], eax
je 0x409c12
cmp bh, bl
je 0x409bec
movzx eax, bl
lea ecx, [esp + 0x88]
lea edx, [esp + 4]
push 1
push eax
call fcn.0041106e
pop eax
pop ecx
mov bh, bl
jmp 0x409bec
mov eax, dword [esp + 0x10]
add dword [esp + 4], eax
lea ebx, [esp + 0x70]
jmp 0x4099fd
mov ebx, dword [esp + 4]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x30]
lea eax, [ebx + ecx]
mov dword [esp + 0x64], ebx
mov dword [esp + 0x24], eax
add eax, ecx
mov ecx, dword [esp + 0x2c]
mov dword [esp + 4], eax
push 0x5a7184
push edi
call fcn.00454a95
pop ecx
pop edx
mov dword [eax], ebx
mov ebx, dword [esp + 0x24]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
push 0x5a7194
push edi
call fcn.00454a95
pop ecx
pop edx
mov dword [eax], ebx
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x24]
shr eax, cl
mov ecx, dword [esp + 8]
push 0x5a71a4
push eax
call fcn.0045f718
pop ecx
pop edx
mov byte [eax], 1
mov ebp, dword [esp + 0x2fc]
lea eax, [esp + 0x88]
cmp dword [esi + 8], 0
je 0x409d12
mov eax, dword [esp + 0x64]
mov ecx, ebp
mov edx, edi
mov dword [esp], eax
call fcn.0040acc0
mov ebx, edx
mov edx, dword [esp]
lea ecx, [esp + 0x88]
push ebx
push eax
call fcn.00410fad
pop eax
pop ecx
mov eax, dword [esp + 0x24]
mov ecx, ebp
mov edx, edi
mov dword [esp], eax
call fcn.0040acc0
mov ebx, edx
mov edx, dword [esp]
lea ecx, [esp + 0x88]
push ebx
push eax
call fcn.00410fad
lea eax, [esp + 0x90]
add esp, 8
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], ebp
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x64]
mov ecx, ebp
mov edx, edi
mov dword [esp + 0x50], eax
lea eax, [esp + 0x24]
mov dword [esp + 0x54], eax
call fcn.0040ac61
xor ebx, ebx
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], edx
mov dword [esp], 0
lea ecx, [esp + 0x58]
lea edx, [esp + 0x80]
call fcn.0040ac7f
cmp byte [esp + 0x58], 0
je 0x409dec
mov edi, dword [esp + 0x5a]
movzx esi, byte [esp + 0x59]
mov ecx, dword [esp]
mov dl, byte [esp + 0x14]
mov ebp, ebx
mov ebx, ebp
cmp ebp, esi
jae 0x409db6
movzx eax, bl
test cl, cl
lea ebp, [ebx + 1]
mov cl, 1
mov al, byte [esp + eax + 0xc8]
je 0x409d98
cmp dl, al
je 0x409d7b
lea ecx, [esp + 0x44]
mov edx, ebx
mov byte [esp], al
movzx eax, al
push 1
push eax
call fcn.00410e86
mov cl, 1
add esp, 8
mov dl, byte [esp]
jmp 0x409d7b
mov al, byte [esp + esi + 0xc8]
test cl, cl
je 0x409dc5
cmp dl, al
je 0x409ddd
mov edx, esi
mov byte [esp], al
movzx eax, al
lea ecx, [esp + 0x44]
push edi
push eax
call fcn.00410e86
pop eax
pop ecx
mov dl, byte [esp]
mov al, 1
mov byte [esp + 0x14], dl
inc ebx
mov dword [esp], eax
jmp 0x409d4e
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], 0xff
mov byte [esp + 0x60], 0
lea ecx, [esp + 0x58]
call fcn.00408353
test eax, eax
je 0x409c36
movzx eax, dl
cmp byte [esp], 0
mov bl, byte [esp + eax + 0xc8]
mov al, 1
mov dword [esp], eax
je 0x409e29
cmp byte [esp + 0x14], bl
je 0x409dfd
movzx eax, bl
lea ecx, [esp + 0x44]
push 1
push eax
call fcn.00410e86
pop eax
pop ecx
mov byte [esp + 0x14], bl
jmp 0x409dfd
mov ecx, dword [esp + 0xbc]
xor eax, eax
mov dword [esp], ecx
mov edx, dword [esp + 0xc]
cmp eax, dword [esp]
je 0x409f2b
mov esi, eax
mov ecx, dword [esp + 0x18]
lea ebp, [eax + 1]
shl esi, cl
mov ecx, dword [esp + 8]
push 0x5a7114
push eax
call fcn.0045f718
pop ecx
pop edx
cmp byte [eax], 0
mov ecx, dword [esp + 0x8c]
mov edx, dword [esp + 0x90]
je 0x409ed6
push 0x5a7154
push esi
call fcn.00454e3c
pop ecx
pop ecx
mov ecx, eax
push 0x5a7164
push dword [esp + 0x14]
call fcn.004113ec
pop ecx
pop ecx
mov esi, edx
mov edi, eax
shl esi, 2
test esi, esi
je 0x409f24
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
lea ebx, [edi + 4]
push 0x5a7174
push dword [edi]
call fcn.00454a95
pop ecx
pop edx
mov eax, dword [eax]
add esi, 0xfffffffc
mov dword [edi], eax
mov edi, ebx
jmp 0x409eae
push 0x5a7124
push esi
call fcn.00454e3c
pop ecx
pop ecx
mov ecx, eax
push 0x5a7134
push dword [esp + 0x14]
call fcn.004113ec
pop ecx
pop ecx
mov esi, edx
mov edi, eax
shl esi, 2
test esi, esi
je 0x409f24
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
lea ebx, [edi + 4]
push 0x5a7144
push dword [edi]
call fcn.00454a95
pop ecx
pop edx
mov eax, dword [eax]
add esi, 0xfffffffc
mov dword [edi], eax
mov edi, ebx
jmp 0x409efc
mov eax, ebp
jmp 0x409e4c
mov edi, dword [esp + 0x3c]
mov esi, dword [esp + 0x38]
mov ecx, esi
mov edx, edi
push 0x5a70d4
mov ebx, dword [esp + 0x300]
push dword [ebx + 0x150]
call fcn.00454a95
pop ecx
pop edx
mov eax, dword [eax]
mov ecx, esi
mov edx, edi
mov dword [esp + 0x1d0], eax
push 0x5a70e4
push dword [ebx + 0x154]
call fcn.00454a95
pop ecx
pop edx
mov eax, dword [eax]
mov ebx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x1d4], eax
mov ecx, ebx
push 0x5a70f4
push dword [esp + 0x24]
call fcn.00454a95
pop ecx
pop edx
mov eax, dword [eax]
mov ecx, esi
mov edx, edi
mov dword [esp + 0x1d8], eax
push 0x5a7104
push dword [esp + 0x20]
call fcn.00454a95
pop ecx
pop edx
mov eax, dword [eax]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 8]
mov dword [esp + 0x1dc], eax
call fcn.00422701
mov ecx, dword [esp + 0x34]
mov edx, esi
call fcn.0045e992
mov ecx, dword [esp + 0x28]
mov edx, ebx
call fcn.0045e992
lea edi, [esp + 0xa0]
lea esi, [esp + 0x88]
mov ecx, esi
call fcn.00408610
mov ecx, edi
call fcn.00408610
mov eax, dword [esi + 0xc]
mov ebp, dword [esi + 0x14]
cmp eax, ebp
jbe 0x40a04c
mov ecx, dword [esp + 0x98]
imul eax, eax, 0xc
test ebp, ebp
je 0x40a026
imul edi, ebp, 0xc
mov edx, eax
push edi
call fcn.00408666
pop ecx
mov ebx, eax
test eax, eax
push 4
pop ecx
jne 0x40a032
jmp 0x40a045
push 4
pop ebx
mov edx, ebx
push eax
call fcn.00402e79
pop eax
mov ecx, 0x80000001
mov dword [esp + 0x98], ebx
mov dword [esp + 0x94], ebp
mov edx, edi
call fcn.00402d89
mov edi, dword [esp + 0x6c]
lea eax, [edi + 4]
push 0x15c
push esi
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
and dword [edi], 0
add esp, 0x2e4
pop esi
pop edi
pop ebx
pop ebp
ret
call fcn.00415d70
ud2