Function at 0x40cb70
Capabilities:
Check if file exists

Disassembly:
push 0xffffffffffffffff
push 0x52acb0
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x580ca0]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x580ca0]
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.004bf084
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.00401340
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.0040aca0
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 0x40cfe9
push 0x18
call fcn.004bf084
add esp, 4
cmp eax, ebx
je 0x40cc72
push ebx
push ebx
mov esi, eax
call fcn.0040aa20
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.004ba280
add esp, 0xc
mov eax, ebp
lea esi, [esp + 0x50]
call fcn.0040b6b0
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 0x40cfe9
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 0x40cfe9
dec esi
movzx esi, si
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], esi
cmp si, bx
jbe 0x40cfdd
jmp 0x40cd34
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.0040bd40
test eax, eax
je 0x40cfd4
cmp si, 1
jne 0x40cdff
lea ecx, [esp + 0x34]
call fcn.00401340
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40cdbf
push 1
push 0xffffffffffffffff
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x40]
mov dword [esp + 0x20], 0x2e
call fcn.0040dae0
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x3c]
call fcn.00401bf0
push str..exe
call fcn.00402ad0
add esp, 4
push eax
push str..exe
lea ecx, [esp + 0x3c]
call fcn.0040dc10
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.0040acc0
add esp, 4
cmp eax, ebx
jl 0x40cfa8
cmp dword [esp + 0x1c], 0x7ea5a6b
jne 0x40cfa8
mov edx, dword [esp + 0x14]
mov dword [esp + 0x18], edx
push 0xc
call fcn.004bf084
add esp, 4
cmp eax, ebx
je 0x40ce21
mov dword [eax + 4], ebx
mov dword [eax], vtable.NKZ::CInFileStream.0
mov dword [eax + 8], 0xffffffff
mov edi, eax
jmp 0x40ce23
xor edi, edi
mov dword [esp + 0x14], edi
cmp edi, ebx
je 0x40ce33
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.0040b330
cmp eax, ebx
jl 0x40cf69
mov esi, dword [esp + 0x18]
cmp esi, ebx
je 0x40ce70
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 0x40cf3e
push 0x18
call fcn.004bf084
add esp, 4
cmp eax, ebx
je 0x40ce8b
push ebx
push esi
mov esi, eax
call fcn.0040aa20
mov ebp, eax
jmp 0x40ce8d
xor ebp, ebp
mov dword [esp + 0x30], ebp
cmp ebp, ebx
je 0x40ce9e
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.004ba280
add esp, 0xc
mov eax, ebp
lea esi, [esp + 0x50]
call fcn.0040b6b0
cmp eax, ebx
jl 0x40cf54
mov esi, dword [esp + 0x20]
cmp word [esp + 0x70], si
jne 0x40cf7f
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x34]
call fcn.00402100
mov byte [esp + 0x88], 3
cmp ebp, ebx
je 0x40cefe
mov edx, dword [ebp]
mov eax, dword [edx + 8]
push ebp
call eax
mov byte [esp + 0x88], 2
cmp edi, ebx
je 0x40cf12
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 0x40cd30
jmp 0x40cfdd
mov byte [esp + 0x88], 2
cmp edi, ebx
je 0x40cfa8
mov edx, dword [edi]
mov eax, dword [edx + 8]
push edi
call eax
jmp 0x40cfa8
mov byte [esp + 0x88], 3
cmp ebp, ebx
je 0x40cf69
mov ecx, dword [ebp]
mov edx, dword [ecx + 8]
push ebp
call edx
mov byte [esp + 0x88], 2
cmp edi, ebx
je 0x40cfa8
mov eax, dword [edi]
mov ecx, dword [eax + 8]
push edi
call ecx
jmp 0x40cfa8
mov byte [esp + 0x88], 3
cmp ebp, ebx
je 0x40cf94
mov edx, dword [ebp]
mov eax, dword [edx + 8]
push ebp
call eax
mov byte [esp + 0x88], 2
cmp edi, ebx
je 0x40cfa8
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.0040baf0
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.004ba1db
add esp, 0x78
ret 8