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

Disassembly:
push 0xffffffffffffffff
push 0x4dfb08
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov eax, dword [0x50f130]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
mov esi, ecx
xor ebp, ebp
lea eax, [esp + 0x14]
mov dword [esp + 0x1c], ebp
call fcn.00474850
mov dword [esp + 0x2c], ebp
mov eax, dword [0x513568]
mov dword [esp + 0x18], eax
mov byte [esp + 0x2c], 1
mov esi, dword [esi]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0x10
mov ebx, dword [esp + 0x14]
jne 0x474fe8
mov esi, dword [esp + 0x18]
lea edi, [ebp + 1]
jmp 0x475140
mov eax, dword [ebx - 8]
movzx eax, word [ebx + eax*2 - 2]
cmp ax, 0x5c
je 0x475015
push 0x4f09a4
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
mov eax, 0x4f09a4
lea edi, [esp + 0x14]
call fcn.00474d40
mov ebx, dword [esp + 0x14]
mov eax, dword [ebx - 8]
cmp eax, ebp
jge 0x475021
or eax, 0xffffffff
jmp 0x47503c
push 0x4f09a4
push ebx
call fcn.004b9c1e
add esp, 8
cmp eax, ebp
jne 0x475038
or eax, 0xffffffff
jmp 0x47503c
sub eax, ebx
sar eax, 1
cmp eax, 0xffffffff
je 0x475130
lea ecx, [esp + 0x20]
lea ebp, [eax + 1]
push ecx
mov edx, ebp
lea ecx, [esp + 0x18]
call fcn.00474900
mov byte [esp + 0x2c], 2
mov eax, dword [eax]
mov esi, dword [eax - 8]
lea edi, [esp + 0x18]
call fcn.00474d40
mov byte [esp + 0x2c], 1
mov eax, dword [esp + 0x20]
lea edx, [eax - 0xc]
cmp edx, 0x513558
je 0x47509d
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x47509d
mov eax, dword [esp + 0x20]
add eax, 0xfffffff4
push eax
call fcn.004b88f2
add esp, 4
test ebp, ebp
mov esi, dword [ebx - 8]
jle 0x4750e4
test esi, esi
jle 0x4750e4
cmp ebp, esi
jle 0x4750ae
mov ebp, esi
lea edi, [esp + 0x14]
call fcn.00474dd0
mov ebx, dword [esp + 0x14]
mov eax, dword [ebx - 4]
mov ecx, esi
sub ecx, ebp
lea edx, [ecx + ecx + 2]
push edx
lea ecx, [ebx + ebp*2]
push ecx
lea eax, [eax + eax + 2]
push eax
push ebx
call fcn.004b894b
push eax
call fcn.004095a0
add esp, 0x14
sub esi, ebp
mov dword [ebx - 8], esi
mov esi, dword [esp + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x475101
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x47513c
cmp dword [ebx - 8], 0
jge 0x47510c
or eax, 0xffffffff
jmp 0x475127
push 0x4f09a4
push ebx
call fcn.004b9c1e
add esp, 8
test eax, eax
jne 0x475123
or eax, 0xffffffff
jmp 0x475127
sub eax, ebx
sar eax, 1
cmp eax, 0xffffffff
jne 0x475045
mov esi, dword [esp + 0x18]
mov dword [esp + 0x1c], 1
mov edi, dword [esp + 0x1c]
lea edx, [esi - 0xc]
cmp edx, 0x513558
je 0x475162
add esi, 0xfffffff4
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x475162
push esi
call fcn.004b88f2
add esp, 4
lea eax, [ebx - 0xc]
cmp eax, 0x513558
je 0x475183
add ebx, 0xfffffff4
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x475183
push ebx
call fcn.004b88f2
add esp, 4
mov eax, edi
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret