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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x450
mov eax, dword [0x1019142c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
cmp dword [ebp + 8], 0
je 0x100593b6
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x100593b6
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 0x100593c5
jmp 0x10059616
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 0x10059420
mov edx, dword [ebp - 0x418]
movzx eax, word [edx]
cmp eax, 0x2f
je 0x10059403
mov ecx, dword [ebp - 0x418]
movzx edx, word [ecx]
cmp edx, 0x5c
jne 0x1005940f
mov eax, dword [ebp - 0x418]
mov dword [ebp - 0x41c], eax
mov ecx, dword [ebp - 0x418]
add ecx, 2
mov dword [ebp - 0x418], ecx
jmp 0x100593da
mov edx, dword [ebp - 0x41c]
mov dword [ebp - 0x43c], edx
mov eax, dword [ebp - 0x41c]
cmp eax, dword [ebp + 0xc]
je 0x100594b0
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.100db130
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 0x10059479
jmp 0x1005947e
call fcn.100de6fc
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.10059380
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 0x100594cc
jmp 0x100594d1
call fcn.100de6fc
xor eax, eax
mov ecx, dword [ebp - 0x440]
mov word [ebp + ecx - 0x20c], ax
cmp dword [ebp + 8], 0
je 0x10059550
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 0x10059508
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 0x10059565
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 0x100595b3
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 0x10059616
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.100ddfee
mov esp, ebp
pop ebp
ret