Function at 0x40c260
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x64c
mov eax, dword [0x491094]
xor eax, esp
mov dword [esp + 0x648], eax
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
mov edi, dword [ebp + 0xc]
mov dword [esp + 0x14], ebx
cmp dword [esi + 0x10], 0x104
jae 0x40c6f9
cmp dword [edi + 0x10], 0x104
jae 0x40c6f9
xor eax, eax
mov dword [esp + 0x32c], 7
push 0xffffffffffffffff
push eax
push edi
lea ecx, [esp + 0x324]
mov dword [esp + 0x334], ebx
mov word [esp + 0x324], ax
call fcn.00403fa0
cmp dword [esp + 0x32c], 8
lea eax, [esp + 0x318]
cmovae eax, dword [esp + 0x318]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40c3ba
lea edx, [esp + 0x318]
lea ecx, [esp + 0x360]
call fcn.0040bfe0
lea ecx, [esp + 0x318]
cmp ecx, eax
je 0x40c31d
push 0xffffffffffffffff
push ebx
push eax
call fcn.00403fa0
lea ecx, [esp + 0x360]
call fcn.00402360
cmp dword [esp + 0x328], ebx
je 0x40c416
mov edx, esi
lea ecx, [esp + 0x390]
call fcn.0040bfe0
mov eax, dword [esp + 0x3a0]
test eax, eax
je 0x40c6b3
cmp dword [esp + 0x328], eax
jb 0x40c37a
lea ecx, [esp + 0x390]
push ecx
push eax
push ecx
lea ecx, [esp + 0x324]
call fcn.0040d000
test eax, eax
je 0x40c6b3
mov ecx, dword [ebp + 0x10]
xor eax, eax
test cl, cl
setne al
lea eax, [eax*2 + 1]
push eax
push ecx
push esi
lea ecx, [esp + 0x3b4]
call fcn.0040e8a0
push esi
call fcn.0040c710
add esp, 4
test al, al
jne 0x40c41d
lea ecx, [esp + 0x3a8]
xor bl, bl
call fcn.0040ea50
jmp 0x40c6b5
lea eax, [esp + 0x330]
push eax
lea ecx, [esp + 0x31c]
call fcn.00407df0
mov edx, eax
lea ecx, [esp + 0x360]
call fcn.0040bfe0
lea ecx, [esp + 0x318]
cmp ecx, eax
je 0x40c3f1
push 0xffffffffffffffff
push 0
push eax
call fcn.00403fa0
lea ecx, [esp + 0x360]
call fcn.00402360
lea ecx, [esp + 0x330]
call fcn.00402360
cmp dword [esp + 0x328], ebx
jne 0x40c336
xor bl, bl
jmp 0x40c6c1
push esi
lea ecx, [esp + 0x34c]
call fcn.00402420
push esi
call fcn.0040c730
add esp, 4
mov byte [esp + 0x14], al
lea ecx, [esp + 0x378]
mov byte [esp + 0x13], 1
push esi
call fcn.00402420
cmp byte [ebp + 0x10], bl
je 0x40c48b
push edi
call fcn.0040c730
add esp, 4
test al, al
je 0x40c48b
lea eax, [esp + 0x360]
mov ecx, esi
push eax
call fcn.00407df0
lea ecx, [esp + 0x378]
cmp ecx, eax
je 0x40c47f
push 0xffffffffffffffff
push 0
push eax
call fcn.00403fa0
lea ecx, [esp + 0x360]
call fcn.00402360
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp dword [esp + 0x358], 0
je 0x40c679
xor eax, eax
mov dword [esp + 0x344], 7
push 0xffffffffffffffff
push eax
push edi
lea ecx, [esp + 0x33c]
mov dword [esp + 0x34c], 0
mov word [esp + 0x33c], ax
call fcn.00403fa0
sub esp, 8
lea eax, [esp + 0x350]
cmp dword [esp + 0x364], 8
mov ecx, esp
cmovae eax, dword [esp + 0x350]
sub esp, 8
mov dword [ecx], eax
mov eax, dword [esp + 0x368]
mov dword [ecx + 4], eax
mov ecx, esp
cmp dword [esp + 0x39c], 8
lea eax, [esp + 0x388]
cmovae eax, dword [esp + 0x388]
mov dword [ecx], eax
mov eax, dword [esp + 0x398]
mov dword [ecx + 4], eax
call fcn.004071e0
add esp, 0x10
test al, al
jne 0x40c54f
lea eax, [esp + 0x330]
push eax
lea eax, [esp + 0x34c]
push eax
lea ecx, [esp + 0x380]
call fcn.00407b30
test al, al
je 0x40c6a3
cmp byte [esp + 0x14], 0
je 0x40c5aa
cmp dword [esp + 0x344], 8
lea eax, [esp + 0x330]
cmovae eax, dword [esp + 0x330]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40c580
shr eax, 4
and al, 1
jne 0x40c5d7
cmp dword [esp + 0x344], 8
lea eax, [esp + 0x330]
push 0
cmovae eax, dword [esp + 0x334]
push eax
call esi
test eax, eax
jne 0x40c5d7
test bl, 4
je 0x40c5d2
and ebx, 0xfffffffb
jmp 0x40c5c9
lea edx, [esp + 0x330]
lea ecx, [esp + 0x348]
call fcn.0040cf80
test al, al
jne 0x40c5d7
test bl, 8
je 0x40c5d2
and ebx, 0xfffffff7
lea ecx, [esp + 0x18]
call fcn.00401d20
mov byte [esp + 0x13], 0
lea eax, [esp + 0x360]
push eax
lea ecx, [esp + 0x3ac]
call fcn.0040eb60
lea ecx, [esp + 0x348]
cmp ecx, eax
je 0x40c600
push 0xffffffffffffffff
push 0
push eax
call fcn.00403fa0
mov eax, dword [esp + 0x374]
cmp eax, 8
jb 0x40c621
inc eax
lea ecx, [esp + 0x360]
push eax
push dword [esp + 0x364]
call fcn.004055c0
cmp dword [esp + 0x358], 0
je 0x40c64d
lea eax, [esp + 0xc8]
push eax
lea ecx, [esp + 0x3ac]
call fcn.0040eb00
mov eax, dword [eax]
shr eax, 4
and eax, 0xffffff01
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x344]
cmp eax, 8
jb 0x40c66e
inc eax
lea ecx, [esp + 0x330]
push eax
push dword [esp + 0x334]
call fcn.004055c0
cmp byte [esp + 0x13], 0
jne 0x40c491
mov bl, byte [esp + 0x13]
lea ecx, [esp + 0x378]
call fcn.00402360
lea ecx, [esp + 0x348]
call fcn.00402360
lea ecx, [esp + 0x3a8]
call fcn.0040ea50
jmp 0x40c6b5
lea ecx, [esp + 0x330]
xor bl, bl
call fcn.00402360
jmp 0x40c67d
xor bl, bl
lea ecx, [esp + 0x390]
call fcn.00402360
mov ecx, dword [esp + 0x32c]
cmp ecx, 8
jb 0x40c6e2
inc ecx
push ecx
push dword [esp + 0x31c]
lea ecx, [esp + 0x320]
call fcn.004055c0
mov al, bl
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x648]
xor ecx, esp
call fcn.00449be1
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x654]
xor al, al
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00449be1
mov esp, ebp
pop ebp
ret