Function at 0x40cb70
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x515ba0
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x568e30]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x568e30]
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.004b9963
add esp, 4
cmp eax, ebx
je 0x40cbe6
mov dword [eax + 4], ebx
or ebp, 0xffffffff
mov dword [eax], vtable.NKZ::CInFileStream.0
mov dword [eax + 8], ebp
mov edi, eax
jmp 0x40cbeb
xor edi, edi
or ebp, 0xffffffff
mov dword [esp + 0x14], edi
cmp edi, ebx
je 0x40cbfb
mov ecx, dword [edi]
mov edx, dword [ecx + 4]
push edi
call edx
mov ecx, esi
mov dword [esp + 0x88], ebx
call fcn.00401850
mov esi, eax
mov eax, dword [edi + 8]
cmp eax, ebp
je 0x40cc1c
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 0x40cc57
call fcn.0040ab50
mov esi, eax
cmp esi, ebx
je 0x40cc57
mov dword [esp + 0x88], ebp
mov eax, dword [edi]
mov ecx, dword [eax + 8]
push edi
call ecx
mov eax, esi
jmp 0x40cfdb
push 0x18
call fcn.004b9963
add esp, 4
cmp eax, ebx
je 0x40cc72
push ebx
push ebx
mov esi, eax
call fcn.0040a8d0
mov ebp, eax
jmp 0x40cc74
xor ebp, ebp
mov dword [esp + 0x1c], ebp
cmp ebp, ebx
je 0x40cc85
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.004b8df0
add esp, 0xc
mov eax, ebp
lea esi, [esp + 0x50]
call fcn.0040b650
mov esi, eax
cmp esi, ebx
je 0x40ccdc
mov byte [esp + 0x88], bl
cmp ebp, ebx
je 0x40ccc2
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 0x40cfdb
movzx esi, word [esp + 0x70]
mov byte [esp + 0x88], bl
cmp ebp, ebx
je 0x40ccf5
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 0x40cd17
mov eax, 0x80004005
jmp 0x40cfdb
dec esi
movzx esi, si
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], esi
cmp si, bx
jbe 0x40cfcf
jmp 0x40cd34
mov esi, dword [esp + 0x20]
lea ecx, [esp + 0x34]
call fcn.004012d0
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x34]
push ecx
push edx
mov dword [esp + 0x90], 2
call fcn.0040bd40
test eax, eax
je 0x40cfc6
cmp si, 1
jne 0x40cdf1
lea ecx, [esp + 0x34]
call fcn.00401850
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40cdb1
push 1
push 0xffffffffffffffff
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x40]
mov dword [esp + 0x20], 0x2e
call fcn.0040db70
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x3c]
call fcn.00401c90
push str..exe
lea ecx, [esp + 0x38]
call fcn.0040d920
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x38]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x18], ebx
call fcn.00401850
lea ecx, [esp + 0x20]
call fcn.0040ab70
add esp, 4
cmp eax, ebx
jl 0x40cf9a
cmp dword [esp + 0x1c], 0x7ea5a6b
jne 0x40cf9a
mov edx, dword [esp + 0x14]
mov dword [esp + 0x18], edx
push 0xc
call fcn.004b9963
add esp, 4
cmp eax, ebx
je 0x40ce13
mov dword [eax + 4], ebx
mov dword [eax], vtable.NKZ::CInFileStream.0
mov dword [eax + 8], 0xffffffff
mov edi, eax
jmp 0x40ce15
xor edi, edi
mov dword [esp + 0x14], edi
cmp edi, ebx
je 0x40ce25
mov eax, dword [edi]
mov ecx, dword [eax + 4]
push edi
call ecx
lea ecx, [esp + 0x34]
mov byte [esp + 0x88], 3
call fcn.00401850
push eax
mov esi, edi
call fcn.0040b2c0
cmp eax, ebx
jl 0x40cf5b
mov esi, dword [esp + 0x18]
cmp esi, ebx
je 0x40ce62
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 0x40cf30
push 0x18
call fcn.004b9963
add esp, 4
cmp eax, ebx
je 0x40ce7d
push ebx
push esi
mov esi, eax
call fcn.0040a8d0
mov ebp, eax
jmp 0x40ce7f
xor ebp, ebp
mov dword [esp + 0x30], ebp
cmp ebp, ebx
je 0x40ce90
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.004b8df0
add esp, 0xc
mov eax, ebp
lea esi, [esp + 0x50]
call fcn.0040b650
cmp eax, ebx
jl 0x40cf46
mov esi, dword [esp + 0x20]
cmp word [esp + 0x70], si
jne 0x40cf71
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x34]
call fcn.00401790
mov byte [esp + 0x88], 3
cmp ebp, ebx
je 0x40cef0
mov edx, dword [ebp]
mov eax, dword [edx + 8]
push ebp
call eax
mov byte [esp + 0x88], 2
cmp edi, ebx
je 0x40cf04
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
push edi
call edx
lea ecx, [esp + 0x34]
mov dword [esp + 0x88], 0xffffffff
call fcn.00401340
add esi, 0xffff
mov dword [esp + 0x20], esi
cmp si, bx
ja 0x40cd30
jmp 0x40cfcf
mov byte [esp + 0x88], 2
cmp edi, ebx
je 0x40cf9a
mov edx, dword [edi]
mov eax, dword [edx + 8]
push edi
call eax
jmp 0x40cf9a
mov byte [esp + 0x88], 3
cmp ebp, ebx
je 0x40cf5b
mov ecx, dword [ebp]
mov edx, dword [ecx + 8]
push ebp
call edx
mov byte [esp + 0x88], 2
cmp edi, ebx
je 0x40cf9a
mov eax, dword [edi]
mov ecx, dword [eax + 8]
push edi
call ecx
jmp 0x40cf9a
mov byte [esp + 0x88], 3
cmp ebp, ebx
je 0x40cf86
mov edx, dword [ebp]
mov eax, dword [edx + 8]
push ebp
call eax
mov byte [esp + 0x88], 2
cmp edi, ebx
je 0x40cf9a
mov ecx, dword [edi]
mov edx, dword [ecx + 8]
push edi
call edx
lea ecx, [esp + 0x34]
call fcn.00401340
lea ecx, [esp + 0x34]
call fcn.004012d0
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x34]
push eax
push ecx
mov dword [esp + 0x90], 5
call fcn.0040bac0
lea ecx, [esp + 0x34]
call fcn.00401340
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.004b8dd5
add esp, 0x78
ret 8