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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100a80b0
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x100c66d0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor esi, esi
cmp dword [eax + 0x10], esi
je 0x100380af
push 0xffffffffffffffff
xor ecx, ecx
push esi
mov word [ebp - 0x30], cx
push eax
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x1c], 7
mov dword [ebp - 0x20], esi
call fcn.10005150
mov dword [ebp - 4], esi
mov ecx, dword [ebp - 0x20]
lea eax, [ecx - 1]
cmp ecx, eax
ja 0x1003804c
push str.invalid_string_position
call fcn.1003bee3
mov edi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x30]
mov edx, ebx
cmp edi, 8
jae 0x1003805c
lea edx, [ebp - 0x30]
cmp word [edx + eax*2], 0x5c
je 0x10038091
cmp ecx, eax
ja 0x10038071
push str.invalid_string_position
call fcn.1003bee3
mov ecx, ebx
cmp edi, 8
jae 0x1003807b
lea ecx, [ebp - 0x30]
cmp word [ecx + eax*2], 0x2f
je 0x10038091
push 1
mov eax, 0x100b6220
lea ecx, [ebp - 0x30]
call fcn.10005e70
lea ecx, [ebp - 0x30]
call fcn.10037bc0
test al, al
jne 0x100380b6
cmp dword [ebp - 0x1c], 8
jb 0x100380af
mov edx, dword [ebp - 0x30]
push edx
call fcn.1003d468
add esp, 4
xor al, al
jmp 0x10038202
cmp dword [ebp - 0x20], esi
je 0x100380f3
mov eax, dword [ebp - 0x30]
mov edi, 8
cmp dword [ebp - 0x1c], edi
jae 0x100380cb
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
setne al
test al, al
je 0x100380f3
cmp dword [ebp - 0x1c], edi
jb 0x100380ec
mov eax, dword [ebp - 0x30]
push eax
call fcn.1003d468
add esp, 4
mov al, 1
jmp 0x10038202
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x58], esi
lea ecx, [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 1
call fcn.10037d80
mov edi, dword [ebp - 0x60]
add esp, 4
cmp edi, dword [ebp - 0x5c]
jne 0x1003812e
lea esi, [ebp - 0x60]
call fcn.10004320
lea ecx, [ebp - 0x30]
call fcn.10004230
xor al, al
jmp 0x10038202
mov byte [ebp - 0x4d], 1
cmp dword [edi + 0x14], 8
jb 0x1003813c
mov edx, dword [edi]
jmp 0x1003813e
mov edx, edi
xor eax, eax
mov word [ebp - 0x4c], ax
mov eax, edx
mov dword [ebp - 0x38], 7
mov dword [ebp - 0x3c], esi
lea ebx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x10038153
sub eax, ebx
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x4c]
call fcn.10005fb0
cmp dword [ebp - 0x3c], esi
jne 0x10038175
xor al, al
jmp 0x1003818d
cmp dword [ebp - 0x38], 8
mov eax, dword [ebp - 0x4c]
jae 0x10038181
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
setne al
test al, al
sete bl
cmp dword [ebp - 0x38], 8
jb 0x100381a4
mov ecx, dword [ebp - 0x4c]
push ecx
call fcn.1003d468
add esp, 4
test bl, bl
je 0x100381c0
cmp dword [edi + 0x14], 8
jb 0x100381b2
mov eax, dword [edi]
jmp 0x100381b4
mov eax, edi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x100381d1
add edi, 0x1c
cmp edi, dword [ebp - 0x5c]
jne 0x10038132
mov bl, byte [ebp - 0x4d]
jmp 0x100381d3
xor bl, bl
mov eax, dword [ebp - 0x60]
cmp eax, esi
je 0x100381ee
mov edi, dword [ebp - 0x5c]
call fcn.10006280
mov edx, dword [ebp - 0x60]
push edx
call fcn.1003d468
add esp, 4
cmp dword [ebp - 0x1c], 8
jb 0x10038200
mov eax, dword [ebp - 0x30]
push eax
call fcn.1003d468
add esp, 4
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1003c5b5
mov esp, ebp
pop ebp
ret