Function at 0x407640
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x6464a0
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x6c3afc]
xor eax, esp
mov dword [esp + 0x50], eax
push ebx
push esi
push edi
mov eax, dword [0x6c3afc]
xor eax, esp
push eax
lea eax, [esp + 0x68]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
cmp dword [eax + 0x10], ebx
je 0x407729
push 0xffffffffffffffff
xor ecx, ecx
push ebx
mov word [esp + 0x30], cx
push eax
lea ecx, [esp + 0x34]
mov dword [esp + 0x48], 7
mov dword [esp + 0x44], ebx
call fcn.00403240
mov dword [esp + 0x70], ebx
mov ecx, dword [esp + 0x38]
lea eax, [ecx - 1]
cmp ecx, eax
ja 0x4076be
push str.invalid_string_position
call fcn.005fe693
mov esi, dword [esp + 0x3c]
mov edi, dword [esp + 0x28]
mov edx, edi
cmp esi, 8
jae 0x4076d1
lea edx, [esp + 0x28]
cmp word [edx + eax*2], 0x5c
je 0x407708
cmp ecx, eax
ja 0x4076e6
push str.invalid_string_position
call fcn.005fe693
mov ecx, edi
cmp esi, 8
jae 0x4076f1
lea ecx, [esp + 0x28]
cmp word [ecx + eax*2], 0x2f
je 0x407708
push 1
push 0x688728
lea ecx, [esp + 0x30]
call fcn.0040a780
lea ecx, [esp + 0x28]
call fcn.004071f0
test al, al
jne 0x407730
cmp dword [esp + 0x3c], 8
jb 0x407729
mov edx, dword [esp + 0x28]
push edx
call fcn.004effaf
add esp, 4
xor al, al
jmp 0x4078ae
cmp dword [esp + 0x38], ebx
je 0x407773
mov eax, dword [esp + 0x28]
mov esi, 8
cmp dword [esp + 0x3c], esi
jae 0x407749
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
setne al
test al, al
je 0x407773
cmp dword [esp + 0x3c], esi
jb 0x40776c
mov eax, dword [esp + 0x28]
push eax
call fcn.004effaf
add esp, 4
mov al, 1
jmp 0x4078ae
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x18]
mov byte [esp + 0x74], 1
call fcn.004073f0
mov edi, dword [esp + 0x18]
add esp, 4
cmp edi, dword [esp + 0x18]
jne 0x4077b8
lea ecx, [esp + 0x14]
call fcn.00409ce0
lea ecx, [esp + 0x28]
call fcn.004bf3b0
xor al, al
jmp 0x4078ae
mov byte [esp + 0x13], 1
jmp 0x4077c2
xor ebx, ebx
cmp dword [edi + 0x14], 8
jb 0x4077cc
mov edx, dword [edi]
jmp 0x4077ce
mov edx, edi
xor eax, eax
mov word [esp + 0x44], ax
mov eax, edx
mov dword [esp + 0x58], 7
mov dword [esp + 0x54], ebx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4077e6
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [esp + 0x4c]
call fcn.00403600
cmp dword [esp + 0x54], ebx
jne 0x40780a
xor al, al
jmp 0x407825
cmp dword [esp + 0x58], 8
mov eax, dword [esp + 0x44]
jae 0x407819
lea eax, [esp + 0x44]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
setne al
test al, al
mov esi, 8
sete bl
cmp dword [esp + 0x58], esi
jb 0x407842
mov ecx, dword [esp + 0x44]
push ecx
call fcn.004effaf
add esp, 4
test bl, bl
je 0x40785e
cmp dword [edi + 0x14], esi
jb 0x40784f
mov eax, dword [edi]
jmp 0x407851
mov eax, edi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x407871
add edi, 0x1c
cmp edi, dword [esp + 0x18]
jne 0x4077c0
mov bl, byte [esp + 0x13]
jmp 0x407873
xor bl, bl
mov edi, dword [esp + 0x14]
test edi, edi
je 0x407899
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
push edx
lea eax, [esp + 0x24]
push eax
push ecx
push edi
call fcn.00402cd0
push edi
call fcn.004effaf
add esp, 0x14
cmp dword [esp + 0x3c], esi
jb 0x4078ac
mov edx, dword [esp + 0x28]
push edx
call fcn.004effaf
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x50]
xor ecx, esp
call fcn.005dd8e2
mov esp, ebp
pop ebp
ret