Function at 0x403a90
Capabilities:
Create directory
Get common file path
Read file on windows
Set current directory
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x264
mov eax, dword [0x450008]
xor eax, esp
mov dword [esp + 0x260], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0xc]
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 0x14]
mov dword [esp + 0x28], eax
lea eax, [esp + 0x60]
push eax
push 0x104
mov dword [esp + 0x44], edx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], esi
mov dword [esp + 0x24], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, dword [esp + 0x34]
mov ebx, dword [eax]
cmp ebx, 0xffffffff
je 0x403b47
cmp dword [eax + 4], 0xffffffff
je 0x403b47
mov ecx, dword [esp + 0x20]
mov ecx, dword [ebx + ecx]
add ecx, dword [esp + 0x14]
call fcn.004022f0
mov esi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push esi
call fcn.0041b826
mov eax, dword [esp + 0x24]
add esp, 4
mov ecx, dword [ebx + eax]
add ecx, dword [esp + 0x14]
call fcn.004022f0
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push esi
call fcn.0041b826
mov esi, dword [esp + 0x14]
add esp, 4
mov eax, dword [esp + 0x34]
cmp word [esi + 2], 2
mov ebx, dword [eax + 0xc]
mov edx, dword [esp + 0x20]
sbb ecx, ecx
and ecx, 0xfffffffc
mov dword [esp + 0x38], 0
add ecx, 0x2c
add ebx, edx
cmp dword [eax + 8], 0
mov dword [esp + 0x44], ecx
jbe 0x403e2d
mov dword [esp + 0x40], 0x1000000
nop dword [eax + eax]
test byte [ebx + 4], 0x10
je 0x403baa
push dword [esp + 0x28]
mov eax, dword [ebx + 0x20]
add eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x18]
push edi
push eax
push esi
push edx
mov edx, dword [esp + 0x50]
call fcn.00403a90
add esp, 0x14
jmp 0x403e0f
push 0x1000000
call fcn.00422762
add esp, 4
mov dword [esp + 0x30], eax
test eax, eax
je 0x403e4f
mov ecx, dword [ebx]
add ecx, dword [esp + 0x14]
call fcn.004022f0
mov esi, eax
push 0x449f1c
push esi
call fcn.0042514d
push esi
mov dword [esp + 0x38], eax
call fcn.0041b826
add esp, 0xc
cmp dword [ebx + 0x24], 0
je 0x403d5a
mov ecx, dword [esp + 0x10]
push edi
mov esi, dword [ecx + 8]
add esi, dword [ebx + 0x20]
call fcn.00425842
add esp, 4
cmp eax, esi
je 0x403c15
push 0
push esi
push edi
call fcn.00425ea8
add esp, 0xc
mov edx, dword [esp + 0x10]
cmp word [edx + 2], 2
jb 0x403cce
mov edx, dword [ebx + 0x28]
cmp edx, 0xffffffff
je 0x403cca
mov eax, dword [ebx + 0x24]
xor ecx, ecx
add eax, edx
setb cl
neg ecx
or ecx, eax
push ecx
call fcn.00422762
mov ecx, dword [esp + 0x14]
add esp, 4
mov esi, eax
cmp word [ecx + 2], 5
jb 0x403c69
mov eax, dword [ebx + 0x24]
mov ecx, dword [ebx + 0x28]
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], ecx
cmp eax, 0xffffffff
jne 0x403c7d
jmp 0x403c70
mov eax, dword [ebx + 0x28]
mov dword [esp + 0x18], eax
push edi
call fcn.00425842
mov dword [esp + 0x28], eax
add esp, 4
push edi
mov edi, dword [esp + 0x1c]
push edi
push 1
push esi
call fcn.00425a58
push dword [esp + 0x38]
mov edx, edi
mov ecx, esi
push dword [esp + 0x38]
call fcn.00403a30
mov edx, dword [ebx + 0x28]
mov ecx, esi
add edx, esi
call fcn.00403350
push dword [esp + 0x44]
mov eax, dword [ebx + 0x28]
push 1
push dword [ebx + 0x24]
add eax, esi
push eax
call fcn.00424f9b
push esi
call fcn.00422747
add esp, 0x2c
jmp 0x403d5a
mov edx, dword [esp + 0x10]
mov eax, dword [ebx + 0x24]
xor ecx, ecx
mov dword [esp + 0x18], ecx
test eax, eax
je 0x403d5a
nop dword [eax + eax]
mov esi, eax
sub esi, ecx
cmp esi, 0x1000000
cmova esi, dword [esp + 0x40]
cmp word [edx + 2], 5
jb 0x403d04
lea edi, [eax + ecx]
cmp edi, 0xffffffff
jne 0x403d0f
push dword [esp + 0x1c]
jmp 0x403d05
push edi
call fcn.00425842
mov edi, eax
add esp, 4
push dword [esp + 0x1c]
push esi
push 1
push dword [esp + 0x3c]
call fcn.00425a58
push dword [esp + 0x38]
mov edx, esi
push edi
mov edi, dword [esp + 0x48]
mov ecx, edi
call fcn.00403a30
push dword [esp + 0x44]
push 1
push esi
push edi
call fcn.00424f9b
mov ecx, dword [esp + 0x40]
add esp, 0x28
mov eax, dword [ebx + 0x24]
add ecx, esi
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x18], ecx
cmp ecx, eax
jb 0x403ce0
push dword [esp + 0x2c]
call fcn.00422b16
push dword [esp + 0x34]
call fcn.00422747
mov ecx, dword [ebx]
add esp, 8
add ecx, dword [esp + 0x14]
call fcn.004022f0
push 0
push 0x80
push 3
push 0
push 0
mov esi, eax
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push esi
mov edi, eax
call fcn.0041b826
mov eax, dword [ebx + 0x14]
add esp, 4
mov ecx, dword [ebx + 0xc]
mov edx, dword [ebx + 8]
mov dword [esp + 0x54], eax
mov eax, dword [ebx + 0x1c]
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x54]
mov dword [esp + 0x60], ecx
mov ecx, dword [ebx + 0x10]
push eax
lea eax, [esp + 0x60]
mov dword [esp + 0x58], ecx
mov ecx, dword [ebx + 0x18]
push eax
push edi
mov dword [esp + 0x68], edx
mov dword [esp + 0x58], ecx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx]
add ecx, dword [esp + 0x14]
call fcn.004022f0
push dword [ebx + 4]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call fcn.0041b826
mov edi, dword [esp + 0x20]
add esp, 4
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
inc eax
add ebx, dword [esp + 0x44]
mov edx, dword [esp + 0x20]
mov dword [esp + 0x38], eax
cmp eax, dword [ecx + 8]
jb 0x403b80
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x260]
xor ecx, esp
call fcn.0041b61b
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x26c]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041b61b
mov esp, ebp
pop ebp
ret