Function at 0x40c8a0
Capabilities:
Check if file exists
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x438d58
mov eax, dword fs:[0]
push eax
sub esp, 0x68
mov eax, dword [0x450068]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov esi, dword [ebp + 8]
xorps xmm0, xmm0
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x3c], 1
movlpd qword [ebp - 0x44], xmm0
mov dword [ebp - 0x34], 0
test esi, esi
je 0x40ce3d
cmp word [esi], 0
je 0x40ce3d
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c911
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [edi + 0x14]
call fcn.00402cf0
push esi
mov ecx, edi
call fcn.0040c260
cmp dword [edi + 0x40], 8
lea ebx, [edi + 0x2c]
mov dword [ebp - 0x28], ebx
jb 0x40c943
mov ebx, dword [ebx]
mov dword [ebp - 0x28], ebx
push ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40c96b
push esi
push str.File
push str._s:__s
push str.PathFileExists
call fcn.004116a0
add esp, 0x10
jmp 0x40ce9a
mov esi, dword [ebp - 0x2c]
test esi, esi
je 0x40c99f
lea edx, [esi + 0x2c]
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x2c], eax
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40c980
sub ecx, dword [ebp - 0x2c]
sar ecx, 1
push ecx
push edx
lea ecx, [edi + 0x44]
call fcn.00402cf0
test byte [esi], 0x10
jne 0x40c9aa
push ebx
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
je 0x40c9c5
push 9
push str.Directory
lea ecx, [edi + 0x5c]
call fcn.00402cf0
mov dword [ebp - 0x38], 0
jmp 0x40cbc6
push 4
push str.File
lea ecx, [edi + 0x5c]
call fcn.00402cf0
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x34], esi
cmp esi, 0xffffffff
je 0x40cc08
test esi, esi
je 0x40cc08
cmp dword [ebp + 0x10], 0
jne 0x40ca74
lea eax, [edi + 0x188]
push eax
lea eax, [edi + 0x174]
push eax
lea ecx, [edi + 0x164]
push ecx
lea eax, [ebp - 0x44]
push eax
push esi
call fcn.0040a480
push dword [ebp - 0x40]
push dword [ebp - 0x44]
lea ecx, [ebp - 0x5c]
call fcn.0040b830
add esp, 8
lea ecx, [edi + 0x8c]
push eax
call fcn.00406450
mov edx, dword [ebp - 0x48]
cmp edx, 8
jb 0x40ca9e
mov ecx, dword [ebp - 0x5c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ca94
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ceb8
jmp 0x40ca94
lea eax, [edi + 0x164]
push eax
push esi
call fcn.0040a0f0
lea eax, [ebp - 0x24]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
push dword [ebp - 0x20]
push dword [ebp - 0x24]
jmp 0x40ca2b
push edx
push ecx
call fcn.0041aec9
add esp, 8
mov ecx, esi
call fcn.004131e0
test eax, eax
je 0x40cbc6
push 4
push 0x40
mov dword [edi], 1
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
lea esi, [edi + 0x164]
test eax, eax
je 0x40cadb
mov ecx, dword [esi]
xor ebx, ebx
cmp ecx, dword [eax]
push eax
sete bl
call dword [sym.imp.KERNEL32.dll_LocalFree]
test ebx, ebx
jne 0x40cb0b
lea eax, [ebp - 0x5c]
mov ecx, esi
push eax
call fcn.0040e530
push eax
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x14], 1
mov esi, dword [0x4520d4]
mov ecx, 0x4520d0
push eax
call fcn.00402ad0
cmp dword [ebp - 0x2c], esi
je 0x40cb0b
mov bl, 1
jmp 0x40cb0d
xor bl, bl
test byte [ebp - 0x14], 1
je 0x40cb4d
mov edx, dword [ebp - 0x48]
cmp edx, 8
jb 0x40cb4d
mov ecx, dword [ebp - 0x5c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40cb43
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ceb8
push edx
push ecx
call fcn.0041aec9
add esp, 8
test bl, bl
je 0x40cbf3
lea eax, [ebp - 0x5c]
push eax
lea ecx, [edi + 0x164]
call fcn.0040e530
push eax
mov ecx, 0x4520d0
mov dword [ebp - 4], 0
call fcn.0040b1f0
push eax
lea ecx, [edi + 0x1a8]
call fcn.0040ae00
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x48]
cmp edx, 8
jb 0x40cbc3
mov ecx, dword [ebp - 0x5c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40cbb9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ceb8
push edx
push ecx
call fcn.0041aec9
add esp, 8
mov ebx, dword [ebp - 0x28]
push 0x424
call fcn.0041aed7
mov esi, eax
add esp, 4
test esi, esi
je 0x40cc29
push 0x422
lea ecx, [esi + 2]
push 0
push ecx
call fcn.0041d060
add esp, 0xc
xor eax, eax
mov word [esi], ax
jmp 0x40cc2b
mov ebx, dword [ebp - 0x28]
lea eax, [edi + 0x1a8]
push eax
push ebx
call fcn.0040a7d0
mov dword [edi + 4], eax
jmp 0x40cbc6
push ebx
push str.File
push str._s:__s
push 0x448668
call fcn.004116a0
add esp, 0x10
mov dword [ebp - 0x3c], 0
jmp 0x40cbc6
xor esi, esi
cmp dword [ebp - 0x38], 0
je 0x40cd6e
cmp dword [ebp - 0x3c], 0
je 0x40cd6e
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x14], 0
push eax
push 0
push 0
push 0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x1c], 0
push eax
push 1
push 1
push dword [ebp - 0x34]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x2c], 0
call dword [sym.imp.ADVAPI32.dll_GetSecurityInfo]
test eax, eax
je 0x40cc8b
push 0
push 0x4489a4
call fcn.004116a0
jmp 0x40cd5b
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
test eax, eax
jne 0x40ccac
push eax
push 0x4489c4
call fcn.004116a0
jmp 0x40cd5b
mov edx, dword [ebp - 0x18]
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x30], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ccb7
sub ecx, dword [ebp - 0x30]
sar ecx, 1
push edx
push 0x447d64
lea eax, [ecx + 1]
push eax
push esi
call fcn.00413080
add esp, 0x10
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0x208
call fcn.0041aed7
push 0x208
mov dword [ebp - 0x28], eax
call fcn.0041aed7
push 0x104
push 0
push dword [ebp - 0x28]
mov dword [ebp - 0x30], eax
call fcn.0041d060
push 0x104
push 0
push dword [ebp - 0x30]
call fcn.0041d060
mov edx, dword [ebp - 0x28]
lea eax, [ebp - 0x2c]
mov ecx, dword [ebp - 0x14]
push eax
push dword [ebp - 0x30]
call fcn.0040eba0
add esp, 0x28
test eax, eax
jne 0x40cd4b
push dword [ebp - 0x28]
push dword [ebp - 0x30]
push str._ls_ls
push dword [ebp - 0x2c]
push esi
call fcn.00413080
add esp, 0x14
push dword [ebp - 0x28]
call fcn.0041aafc
push dword [ebp - 0x30]
call fcn.0041aafc
mov ecx, dword [ebp - 0x34]
lea edx, [edi + 0x154]
add esp, 8
call fcn.0040e820
jmp 0x40cd77
mov edx, esi
mov ecx, ebx
call fcn.0040e9e0
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40cd80
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [edi + 0xa4]
call fcn.00402cf0
push esi
call fcn.0041aafc
add esp, 4
cmp dword [ebp - 0x38], 0
je 0x40cdba
cmp dword [ebp - 0x3c], 0
je 0x40cdba
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [edi + 0x9c], 0
lea edx, [edi + 0x134]
mov ecx, ebx
jne 0x40ce31
lea eax, [ebp - 0x44]
push eax
call fcn.0040e720
push dword [ebp - 0x40]
lea ecx, [ebp - 0x74]
push dword [ebp - 0x44]
call fcn.0040b830
add esp, 0xc
lea ecx, [edi + 0x8c]
push eax
call fcn.00406450
mov edx, dword [ebp - 0x60]
cmp edx, 8
jb 0x40ce9a
mov ecx, dword [ebp - 0x74]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ce25
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ceb8
push edx
push ecx
call fcn.0041aec9
add esp, 8
jmp 0x40ce9a
push 0
call fcn.0040e720
add esp, 4
jmp 0x40ce9a
mov edi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff4
call edi
mov esi, dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
cmp eax, 0xffffffff
je 0x40ce57
push 0xc
push eax
call esi
push str._ERROR_
push 2
call fcn.00422bab
add esp, 4
push eax
call fcn.004040e0
add esp, 8
push 0xfffffffffffffff4
call edi
cmp eax, 0xffffffff
je 0x40ce7d
push 7
push eax
call esi
push str.FileName_is_null_empty
push 0x448f94
push 2
call fcn.00422bab
add esp, 4
push eax
call fcn.004040e0
add esp, 0xc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041aaeb
mov esp, ebp
pop ebp
ret 0x10
call fcn.00422e9e
int3