Function at 0x40ca30
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x516040
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x568cb8]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x568cb8]
xor eax, esp
push eax
lea eax, [esp + 0x80]
mov dword fs:[0], eax
mov eax, dword [esp + 0x90]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x94]
mov esi, ecx
xor ebx, ebx
push 0xc
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], eax
mov dword [eax], ebx
call fcn.004bd0c6
add esp, 4
cmp eax, ebx
je 0x40caa6
mov dword [eax + 4], ebx
or ebp, 0xffffffff
mov dword [eax], vtable.NKZ::CInFileStream.0
mov dword [eax + 8], ebp
mov edi, eax
jmp 0x40caab
xor edi, edi
or ebp, 0xffffffff
mov dword [esp + 0x14], edi
cmp edi, ebx
je 0x40cabb
mov ecx, dword [edi]
mov edx, dword [ecx + 4]
push edi
call edx
mov ecx, esi
mov dword [esp + 0x88], ebx
call fcn.00401340
mov esi, eax
mov eax, dword [edi + 8]
cmp eax, ebp
je 0x40cadc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 8], ebp
push ebx
push ebx
push 3
push ebx
push 1
push connect
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [edi + 8], eax
cmp eax, ebp
jne 0x40cb17
call fcn.0040ab10
mov esi, eax
cmp esi, ebx
je 0x40cb17
mov dword [esp + 0x88], ebp
mov eax, dword [edi]
mov ecx, dword [eax + 8]
push edi
call ecx
mov eax, esi
jmp 0x40cea9
push 0x18
call fcn.004bd0c6
add esp, 4
cmp eax, ebx
je 0x40cb32
push ebx
push ebx
mov esi, eax
call fcn.0040a890
mov ebp, eax
jmp 0x40cb34
xor ebp, ebp
mov dword [esp + 0x1c], ebp
cmp ebp, ebx
je 0x40cb45
mov edx, dword [ebp]
mov eax, dword [edx + 4]
push ebp
call eax
push 0x2a
lea ecx, [esp + 0x54]
push ebx
push ecx
mov byte [esp + 0x94], 1
call fcn.004b83b0
add esp, 0xc
mov eax, ebp
lea esi, [esp + 0x50]
call fcn.0040b570
mov esi, eax
cmp esi, ebx
je 0x40cb9c
mov byte [esp + 0x88], bl
cmp ebp, ebx
je 0x40cb82
mov edx, dword [ebp]
mov eax, dword [edx + 8]
push ebp
call eax
mov dword [esp + 0x88], 0xffffffff
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
push edi
call edx
mov eax, esi
jmp 0x40cea9
movzx esi, word [esp + 0x70]
mov byte [esp + 0x88], bl
cmp ebp, ebx
je 0x40cbb5
mov eax, dword [ebp]
mov ecx, dword [eax + 8]
push ebp
call ecx
mov dword [esp + 0x88], 0xffffffff
mov edx, dword [edi]
mov eax, dword [edx + 8]
push edi
call eax
cmp si, bx
jne 0x40cbd7
mov eax, 0x80004005
jmp 0x40cea9
dec esi
movzx esi, si
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], esi
cmp si, bx
jbe 0x40ce9d
jmp 0x40cbf4
mov esi, dword [esp + 0x20]
lea ecx, [esp + 0x34]
call fcn.004012b0
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x34]
push ecx
push edx
mov dword [esp + 0x90], 2
call fcn.0040bc00
test eax, eax
je 0x40ce94
cmp si, 1
jne 0x40ccbf
lea ecx, [esp + 0x34]
call fcn.00401340
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40cc7f
push 1
push 0xffffffffffffffff
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x40]
mov dword [esp + 0x20], 0x2e
call fcn.0040d9a0
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x3c]
call fcn.00401c10
push str..exe
call fcn.004029f0
add esp, 4
push eax
push str..exe
lea ecx, [esp + 0x3c]
call fcn.0040dad0
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x38]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], ebx
call fcn.00401340
lea ecx, [esp + 0x20]
call fcn.0040ab30
add esp, 4
cmp eax, ebx
jl 0x40ce68
cmp dword [esp + 0x1c], 0x7ea5a6b
jne 0x40ce68
mov edx, dword [esp + 0x14]
mov dword [esp + 0x18], edx
push 0xc
call fcn.004bd0c6
add esp, 4
cmp eax, ebx
je 0x40cce1
mov dword [eax + 4], ebx
mov dword [eax], vtable.NKZ::CInFileStream.0
mov dword [eax + 8], 0xffffffff
mov edi, eax
jmp 0x40cce3
xor edi, edi
mov dword [esp + 0x14], edi
cmp edi, ebx
je 0x40ccf3
mov eax, dword [edi]
mov ecx, dword [eax + 4]
push edi
call ecx
lea ecx, [esp + 0x34]
mov byte [esp + 0x88], 3
call fcn.00401340
push eax
mov esi, edi
call fcn.0040b1f0
cmp eax, ebx
jl 0x40ce29
mov esi, dword [esp + 0x18]
cmp esi, ebx
je 0x40cd30
mov edx, dword [edi]
mov eax, dword [edx + 0x10]
push ebx
push ebx
push ebx
push esi
push edi
call eax
cmp eax, ebx
jl 0x40cdfe
push 0x18
call fcn.004bd0c6
add esp, 4
cmp eax, ebx
je 0x40cd4b
push ebx
push esi
mov esi, eax
call fcn.0040a890
mov ebp, eax
jmp 0x40cd4d
xor ebp, ebp
mov dword [esp + 0x30], ebp
cmp ebp, ebx
je 0x40cd5e
mov ecx, dword [ebp]
mov edx, dword [ecx + 4]
push ebp
call edx
push 0x2a
lea eax, [esp + 0x54]
push ebx
push eax
mov byte [esp + 0x94], 4
call fcn.004b83b0
add esp, 0xc
mov eax, ebp
lea esi, [esp + 0x50]
call fcn.0040b570
cmp eax, ebx
jl 0x40ce14
mov esi, dword [esp + 0x20]
cmp word [esp + 0x70], si
jne 0x40ce3f
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x34]
call fcn.00402110
mov byte [esp + 0x88], 3
cmp ebp, ebx
je 0x40cdbe
mov edx, dword [ebp]
mov eax, dword [edx + 8]
push ebp
call eax
mov byte [esp + 0x88], 2
cmp edi, ebx
je 0x40cdd2
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
push edi
call edx
lea ecx, [esp + 0x34]
mov dword [esp + 0x88], 0xffffffff
call fcn.00401320
add esi, 0xffff
mov dword [esp + 0x20], esi
cmp si, bx
ja 0x40cbf0
jmp 0x40ce9d
mov byte [esp + 0x88], 2
cmp edi, ebx
je 0x40ce68
mov edx, dword [edi]
mov eax, dword [edx + 8]
push edi
call eax
jmp 0x40ce68
mov byte [esp + 0x88], 3
cmp ebp, ebx
je 0x40ce29
mov ecx, dword [ebp]
mov edx, dword [ecx + 8]
push ebp
call edx
mov byte [esp + 0x88], 2
cmp edi, ebx
je 0x40ce68
mov eax, dword [edi]
mov ecx, dword [eax + 8]
push edi
call ecx
jmp 0x40ce68
mov byte [esp + 0x88], 3
cmp ebp, ebx
je 0x40ce54
mov edx, dword [ebp]
mov eax, dword [edx + 8]
push ebp
call eax
mov byte [esp + 0x88], 2
cmp edi, ebx
je 0x40ce68
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
push edi
call edx
lea ecx, [esp + 0x34]
call fcn.00401320
lea ecx, [esp + 0x34]
call fcn.004012b0
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x34]
push eax
push ecx
mov dword [esp + 0x90], 5
call fcn.0040b9b0
lea ecx, [esp + 0x34]
call fcn.00401320
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x2c]
mov dword [edx], eax
xor eax, eax
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.004b8307
add esp, 0x78
ret 8