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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x450
mov eax, dword [0x53806c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
cmp dword [ebp + 8], 0
je 0x4867c6
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4867c6
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edx, dword [ebp + 0xc]
movzx eax, word [edx]
test eax, eax
jne 0x4867d5
jmp 0x486a26
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x41c], ecx
mov edx, dword [ebp - 0x41c]
mov dword [ebp - 0x418], edx
mov eax, dword [ebp - 0x418]
movzx ecx, word [eax]
test ecx, ecx
je 0x486830
mov edx, dword [ebp - 0x418]
movzx eax, word [edx]
cmp eax, 0x2f
je 0x486813
mov ecx, dword [ebp - 0x418]
movzx edx, word [ecx]
cmp edx, 0x5c
jne 0x48681f
mov eax, dword [ebp - 0x418]
mov dword [ebp - 0x41c], eax
mov ecx, dword [ebp - 0x418]
add ecx, 2
mov dword [ebp - 0x418], ecx
jmp 0x4867ea
mov edx, dword [ebp - 0x41c]
mov dword [ebp - 0x43c], edx
mov eax, dword [ebp - 0x41c]
cmp eax, dword [ebp + 0xc]
je 0x4868c0
mov ecx, dword [ebp - 0x41c]
sub ecx, dword [ebp + 0xc]
sar ecx, 1
shl ecx, 1
push ecx
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0x414]
push eax
call fcn.004d5ba0
add esp, 0xc
mov ecx, dword [ebp - 0x41c]
sub ecx, dword [ebp + 0xc]
sar ecx, 1
shl ecx, 1
mov dword [ebp - 0x438], ecx
cmp dword [ebp - 0x438], 0x208
jae 0x486889
jmp 0x48688e
call fcn.004bac09
xor edx, edx
mov eax, dword [ebp - 0x438]
mov word [ebp + eax - 0x414], dx
lea ecx, [ebp - 0x414]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.00486790
add esp, 8
mov eax, dword [ebp - 0x43c]
add eax, 2
mov dword [ebp - 0x43c], eax
mov ecx, 2
imul edx, ecx, 0
mov dword [ebp - 0x440], edx
cmp dword [ebp - 0x440], 0x208
jae 0x4868dc
jmp 0x4868e1
call fcn.004bac09
xor eax, eax
mov ecx, dword [ebp - 0x440]
mov word [ebp + ecx - 0x20c], ax
cmp dword [ebp + 8], 0
je 0x486960
mov edx, dword [ebp + 8]
mov dword [ebp - 0x434], edx
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x428], eax
mov ecx, dword [ebp - 0x428]
mov dword [ebp - 0x450], ecx
mov edx, dword [ebp - 0x434]
mov ax, word [edx]
mov word [ebp - 0x41e], ax
mov ecx, dword [ebp - 0x428]
mov dx, word [ebp - 0x41e]
mov word [ecx], dx
mov eax, dword [ebp - 0x434]
add eax, 2
mov dword [ebp - 0x434], eax
mov ecx, dword [ebp - 0x428]
add ecx, 2
mov dword [ebp - 0x428], ecx
cmp word [ebp - 0x41e], 0
jne 0x486918
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x424], edx
mov eax, dword [ebp - 0x424]
mov dword [ebp - 0x444], eax
mov ecx, dword [ebp - 0x424]
mov dx, word [ecx]
mov word [ebp - 0x42e], dx
add dword [ebp - 0x424], 2
cmp word [ebp - 0x42e], 0
jne 0x486975
mov eax, dword [ebp - 0x424]
sub eax, dword [ebp - 0x444]
mov ecx, dword [ebp - 0x444]
mov dword [ebp - 0x448], ecx
mov dword [ebp - 0x44c], eax
lea edx, [ebp - 0x20c]
add edx, 0xfffffffe
mov dword [ebp - 0x42c], edx
mov eax, dword [ebp - 0x42c]
mov cx, word [eax + 2]
mov word [ebp - 0x430], cx
add dword [ebp - 0x42c], 2
cmp word [ebp - 0x430], 0
jne 0x4869c3
mov edi, dword [ebp - 0x42c]
mov esi, dword [ebp - 0x448]
mov edx, dword [ebp - 0x44c]
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x486a26
push 0
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b9f48
mov esp, ebp
pop ebp
ret