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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1008a57d
mov eax, dword fs:[0]
push eax
sub esp, 0xc
mov eax, dword [0x100b400c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push ecx
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], 0
call fcn.10003880
mov dword [ebp - 4], 0
or edi, 0xffffffff
mov eax, dword [ebp - 0x14]
mov esi, dword [eax - 0xc]
test esi, esi
je 0x10004be7
cmp esi, 1
jg 0x10004a45
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x18]
call fcn.10003920
jmp 0x10004a76
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x10004a55
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x10004a61
call fcn.10004310
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
push eax
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x18]
push 1
lea eax, [eax + esi*2]
add eax, 0xfffffffe
push eax
call fcn.10003b70
mov eax, dword [ebp - 0x18]
mov edx, 0x10094924
mov ecx, eax
mov si, word [ecx]
cmp si, word [edx]
jne 0x10004aa6
test si, si
je 0x10004aa2
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x10004aa6
add ecx, 4
add edx, 4
test si, si
jne 0x10004a80
xor esi, esi
jmp 0x10004aab
sbb esi, esi
or esi, 1
lea edx, [eax - 0x10]
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10004ac2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
jne 0x10004b3d
mov eax, dword [ebp - 0x14]
mov edx, dword [eax - 0xc]
lea ecx, [edx - 1]
test ecx, ecx
cmovns esi, ecx
cmp esi, edx
jl 0x10004ae6
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x18]
call fcn.10003920
jmp 0x10004b0f
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x10004af6
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x10004b02
call fcn.10004310
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
push eax
push esi
push dword [ebp - 0x14]
lea ecx, [ebp - 0x18]
call fcn.10003b70
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x14]
call fcn.100037a0
mov byte [ebp - 4], 0
mov eax, edi
mov edx, dword [ebp - 0x18]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10004b3d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x10004be4
push 0x5c
push dword [ebp - 0x14]
call dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
mov ecx, dword [ebp - 0x14]
add esp, 8
test eax, eax
jne 0x10004b69
or eax, 0xffffffff
jmp 0x10004b6d
sub eax, ecx
sar eax, 1
xor esi, esi
test eax, eax
cmovns esi, eax
cmp esi, dword [ecx - 0xc]
jl 0x10004b87
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x18]
call fcn.10003920
jmp 0x10004bb0
mov ecx, dword [ecx - 0x10]
test ecx, ecx
je 0x10004b97
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x10004ba3
call fcn.10004310
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
push eax
push esi
push dword [ebp - 0x14]
lea ecx, [ebp - 0x18]
call fcn.10003b70
mov byte [ebp - 4], 2
mov esi, dword [ebp - 0x18]
mov ecx, esi
call fcn.100049e0
mov byte [ebp - 4], 0
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x10004bd9
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
push 0
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
lea edx, [eax - 0x10]
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x10004c03
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
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.1007fac0
mov esp, ebp
pop ebp
ret