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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1009b341
mov eax, dword fs:[0]
push eax
sub esp, 0x298
mov eax, dword [0x100e6018]
xor eax, esp
mov dword [esp + 0x290], eax
push ebx
push esi
push edi
mov eax, dword [0x100e6018]
xor eax, esp
push eax
lea eax, [esp + 0x2a8]
mov dword fs:[0], eax
mov dword [esp + 0x14], ecx
mov esi, dword [ebp + 8]
xor eax, eax
mov dword [esp + 0x30], esi
mov dword [esp + 0x2c], 7
mov dword [esp + 0x28], 0
mov word [esp + 0x18], ax
cmp word [esi], ax
jne 0x10039fab
xor ecx, ecx
jmp 0x10039fbf
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10039fb0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [esp + 0x20]
call fcn.100089b0
cmp dword [esp + 0x2c], 8
lea eax, [esp + 0x18]
cmovae eax, dword [esp + 0x18]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov edi, dword [sym.imp.MSVCR110.dll_void___cdecl_operator_delete_void__]
cmp eax, 1
setne bl
cmp dword [esp + 0x2c], 8
jb 0x10039ffb
push dword [esp + 0x18]
call edi
add esp, 4
test bl, bl
je 0x1003a019
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x1003a019
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor al, al
jmp 0x1003a290
mov edx, dword [esp + 0x14]
xor ebx, ebx
mov ecx, dword [edx]
xor eax, eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x6c], ebx
mov word [esp + 0x70], ax
mov dword [esp + 0x298], eax
test ecx, ecx
jne 0x1003a047
mov dword [0x100e8950], 0x10000
jmp 0x1003a078
cmp dword [ecx], 1
je 0x1003a058
mov dword [0x100e8950], 0x80000
jmp 0x1003a078
mov ecx, dword [ecx + 4]
lea eax, [esp + 0x6c]
push eax
push 0xffffffffffffffff
call fcn.10061020
mov ebx, dword [esp + 0x6c]
mov edx, dword [esp + 0x14]
mov dword [0x100e8950], eax
mov dword [esp + 0x34], ebx
xor eax, eax
mov dword [esp + 0x38], eax
test ebx, ebx
jle 0x1003a28e
jmp 0x1003a090
mov ecx, dword [edx]
xor edx, edx
mov dword [esp + 0x6c], 0
mov word [esp + 0x70], dx
mov dword [esp + 0x298], edx
test ecx, ecx
jne 0x1003a0b8
mov dword [0x100e8950], 0x10000
jmp 0x1003a0dc
cmp dword [ecx], 1
je 0x1003a0c9
mov dword [0x100e8950], 0x80000
jmp 0x1003a0dc
mov ecx, dword [ecx + 4]
lea edx, [esp + 0x6c]
push edx
push eax
call fcn.10061020
mov dword [0x100e8950], eax
xor ebx, ebx
mov edi, edi
xor eax, eax
mov dword [esp + 0x2c], 7
mov dword [esp + 0x28], 0
mov word [esp + 0x18], ax
cmp word [esi], ax
je 0x1003a110
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1003a101
sub eax, edx
sar eax, 1
push eax
push esi
lea ecx, [esp + 0x20]
call fcn.100089b0
push 0x100a21f4
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x40]
mov dword [esp + 0x2b4], 0
call fcn.10011da0
add esp, 4
lea ecx, [esp + 0x70]
push ecx
mov edx, eax
lea ecx, [esp + 0x58]
mov byte [esp + 0x2b4], 1
call fcn.10011da0
add esp, 4
cmp dword [esp + 0x50], 8
jb 0x1003a166
push dword [esp + 0x3c]
call edi
add esp, 4
xor eax, eax
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], 0
mov word [esp + 0x3c], ax
mov byte [esp + 0x2b0], 4
cmp dword [esp + 0x2c], 8
jb 0x1003a195
push dword [esp + 0x18]
call edi
add esp, 4
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x54]
mov edx, dword [edx]
xor eax, eax
mov word [esp + 0x18], ax
mov eax, dword [esp + 0x68]
cmp eax, 8
lea esi, [esp + 0x54]
cmovae esi, ecx
mov dword [esp + 0x2c], 7
mov dword [esp + 0x28], 0
test edx, edx
jne 0x1003a1d4
mov dword [0x100e8950], 0x10000
jmp 0x1003a204
cmp dword [edx], 1
je 0x1003a1e5
mov dword [0x100e8950], 0x80000
jmp 0x1003a204
mov ecx, dword [edx + 4]
sub esp, 8
push esi
push 0
call fcn.100617f0
mov dword [0x100e8950], eax
test eax, eax
je 0x1003a241
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x54]
inc ebx
mov dword [esp + 0x2b0], 0xffffffff
cmp eax, 8
jb 0x1003a21b
push ecx
call edi
add esp, 4
mov esi, dword [esp + 0x30]
xor eax, eax
mov dword [esp + 0x68], 7
mov dword [esp + 0x64], 0
mov word [esp + 0x54], ax
cmp ebx, 3
jl 0x1003a0e0
jmp 0x1003a273
mov dword [esp + 0x2b0], 0xffffffff
cmp dword [esp + 0x68], 8
jb 0x1003a25c
push dword [esp + 0x54]
call edi
add esp, 4
xor eax, eax
mov dword [esp + 0x68], 7
mov dword [esp + 0x64], 0
mov word [esp + 0x54], ax
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x30]
mov edx, dword [esp + 0x14]
inc eax
mov dword [esp + 0x38], eax
cmp eax, dword [esp + 0x34]
jl 0x1003a090
mov al, 1
mov ecx, dword [esp + 0x2a8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x290]
xor ecx, esp
call fcn.100947be
mov esp, ebp
pop ebp
ret 4