Function at 0x40c6c2
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
mov eax, dword [0x6a9a60]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
mov edi, ecx
mov dword [ebp - 0x114], eax
lea ecx, [ebp - 0x10c]
mov dword [ebp - 0x11c], edi
mov dword [ebp - 0x118], ebx
mov dword [ebp - 0x110], ebx
call fcn.00404190
cmp dword [ebp + 0x10], ebx
je 0x40c727
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40c727
push esi
mov ecx, edi
call fcn.0040c45e
test eax, eax
setns bl
jmp 0x40c914
lea ecx, [edi + 8]
call fcn.0040d357
lea eax, [ebp - 0x110]
mov ecx, edi
push eax
lea eax, [ebp - 0x118]
push eax
push esi
call fcn.0040c955
mov edi, dword [ebp - 0x118]
test eax, eax
je 0x40c909
test edi, edi
je 0x40c914
mov eax, dword [ebp - 0x114]
test eax, eax
je 0x40c776
push dword [ebp - 0x110]
push edi
call eax
test eax, eax
je 0x40c909
mov eax, dword [ebp + 0xc]
sub eax, 1
je 0x40c8ad
sub eax, 1
je 0x40c7aa
sub eax, 1
jne 0x40c8e7
push edi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcslen]
pop ecx
push eax
push edi
lea ecx, [ebp - 0x10c]
call fcn.0040c36b
jmp 0x40c8e7
lea eax, [ebp - 0x104]
push edi
mov dword [ebp - 0x108], eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
push 0x80
lea esi, [eax + 1]
lea eax, [ebp - 0x104]
mov dword [ebp - 0x114], esi
push eax
lea eax, [ebp - 0x108]
push esi
push eax
call fcn.004053f0
add esp, 0x14
push esi
push dword [ebp - 0x108]
push esi
push edi
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
test eax, eax
sete cl
mov dword [ebp - 0x110], ecx
test eax, eax
jne 0x40c867
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40c861
push ebx
push ebx
push esi
push edi
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
lea eax, [ebp - 0x104]
push 0x80
push eax
lea eax, [ebp - 0x108]
push esi
push eax
call fcn.004053f0
add esp, 0x10
push esi
push dword [ebp - 0x108]
push dword [ebp - 0x114]
push edi
push ebx
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
neg eax
sbb ecx, ecx
inc ecx
jmp 0x40c867
mov ecx, dword [ebp - 0x110]
test ecx, ecx
jne 0x40c935
mov esi, dword [ebp - 0x108]
test esi, esi
je 0x40c883
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcslen]
pop ecx
mov ebx, eax
push ebx
push esi
lea ecx, [ebp - 0x10c]
call fcn.00404cd0
lea eax, [ebp - 0x104]
cmp dword [ebp - 0x108], eax
je 0x40c8e7
push dword [ebp - 0x108]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
jmp 0x40c8e7
push edi
call fcn.00402400
mov esi, eax
pop ecx
lea ecx, [ebp - 0x10c]
test esi, esi
jle 0x40c8e2
push esi
call fcn.004047c0
push esi
push eax
push 0xffffffffffffffff
push edi
push ebx
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push esi
lea ecx, [ebp - 0x10c]
call fcn.00404790
jmp 0x40c8e7
call fcn.004041c0
push 0xa
push 0xd
lea ecx, [ebp - 0x10c]
call fcn.00403f30
mov ecx, dword [ebp - 0x11c]
push dword [ebp - 0x10c]
mov eax, dword [ecx]
call dword [eax]
xor ebx, ebx
inc ebx
test edi, edi
je 0x40c914
push edi
call fcn.004b2fff
pop ecx
mov ecx, dword [ebp - 0x10c]
lea ecx, [ecx - 0x10]
call fcn.004023e0
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b3004
leave
ret 0x10
push 0x80
lea eax, [ebp - 0x104]
push eax
push dword [ebp - 0x108]
call fcn.00405260
add esp, 0xc
call fcn.00401ed0
int3