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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1010518b
mov eax, dword fs:[0]
push eax
sub esp, 0xf4
mov eax, dword [0x1014857c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0xf4], edi
mov esi, dword [edi + 0x2c]
cmp dword [esi - 0xc], 0
jne 0x100512b5
xor eax, eax
jmp 0x100514e7
lea ecx, [edi + 4]
mov dword [ebp - method._BaseModule::CAutoLocker.virtual_0], vtable._BaseModule::CAutoLocker.0
mov dword [ebp - 0xfc], ecx
test ecx, ecx
je 0x100512d4
mov eax, dword [ecx]
push ecx
call dword [eax]
mov esi, dword [edi + 0x2c]
mov dword [ebp - 4], 0
lea ecx, [esi + 2]
mov dword [ebp - 0xf8], 0
nop dword [eax + eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x100512f0
sub esi, ecx
mov edx, 2
sar esi, 1
xor ecx, ecx
inc esi
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.10081117
add esi, esi
mov dword [ebp - 0xf0], eax
push esi
push 0
push eax
call fcn.1008e2a0
mov eax, dword [edi + 0x2c]
add esp, 0x10
shr esi, 1
je 0x10051372
mov ecx, dword [ebp - 0xf0]
mov edx, SysReAllocString
mov edi, eax
sub edx, esi
sub edi, ecx
lea eax, [edx + esi]
test eax, eax
je 0x1005135f
movzx eax, word [edi + ecx]
test ax, ax
je 0x1005135f
mov word [ecx], ax
add ecx, 2
sub esi, 1
jne 0x10051344
mov edi, dword [ebp - 0xf4]
lea eax, [ecx - 2]
test esi, esi
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov esi, dword [ebp - 0xf0]
push esi
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x10051393
push eax
push esi
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x100514b9
lea eax, [ebp - 0xe8]
xorps xmm0, xmm0
push eax
movups xmmword [ebp - 0xe8], xmm0
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0xc8
lea eax, [ebp - 0xd8]
push 0
push eax
call fcn.1008e2a0
movzx eax, word [ebp - 0xdc]
push eax
movzx eax, word [ebp - 0xde]
push eax
movzx eax, word [ebp - 0xe0]
push eax
movzx eax, word [ebp - 0xe2]
push eax
movzx eax, word [ebp - 0xe6]
push eax
movzx eax, word [ebp - 0xe8]
push eax
push 0x1011a124
lea eax, [ebp - 0xd8]
push 0x400
push eax
call fcn.100515f0
push 0x1011a164
push dword [edi + 0x2c]
call fcn.100af596
mov ecx, eax
add esp, 0x38
mov dword [ebp - 0xec], ecx
test ecx, ecx
je 0x100514b9
cmp dword [edi + 0x30], 0
mov dword [ebp - 0xf8], 1
je 0x10051464
lea eax, [ebp - 0xd8]
push eax
push 0x1011a168
push ecx
call fcn.10051670
mov ecx, dword [ebp - 0xec]
add esp, 0xc
mov dword [edi + 0x30], 0
mov eax, dword [edi + 0x24]
xor esi, esi
sub eax, dword [edi + 0x20]
sar eax, 2
mov dword [ebp - 0xf4], eax
test eax, eax
jle 0x1005149e
nop dword [eax]
mov eax, dword [edi + 0x20]
push dword [eax + esi*4]
push ecx
call fcn.10051670
mov ecx, dword [ebp - 0xec]
inc esi
add esp, 8
cmp esi, dword [ebp - 0xf4]
jl 0x10051480
mov esi, dword [ebp - 0xec]
push esi
call fcn.100bdfec
push esi
call fcn.100af0be
mov esi, dword [ebp - 0xf0]
add esp, 8
test esi, esi
je 0x100514c6
push esi
call fcn.10081120
add esp, 4
mov ecx, edi
call fcn.10051180
lea edx, [edi + 4]
mov dword [ebp - 4], 1
test edx, edx
je 0x100514e1
mov ecx, dword [edx]
push edx
call dword [ecx + 4]
mov eax, dword [ebp - 0xf8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100810f8
mov esp, ebp
pop ebp
ret