Function at 0x403a60
Capabilities:
Create directory
Encode data using xor
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
push esi
mov esi, dword [ebp + 0x14]
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0x18]
mov dword [esp + 0x38], eax
lea eax, [esp + 0x60]
push eax
mov dword [esp + 0x24], ecx
mov ecx, dword [ebp + 0xc]
push 0x104
mov dword [esp + 0x48], edx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x18], esi
mov dword [esp + 0x3c], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, dword [esp + 0x38]
mov ebx, dword [eax]
cmp ebx, 0xffffffff
je 0x403b17
cmp dword [eax + 4], 0xffffffff
je 0x403b17
mov edx, dword [esp + 0x2c]
mov ecx, dword [ebx + edx]
add ecx, dword [esp + 0x20]
call fcn.00402220
mov esi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push esi
call fcn.0041bce6
mov eax, dword [esp + 0x30]
add esp, 4
mov ecx, dword [ebx + eax]
add ecx, dword [esp + 0x20]
call fcn.00402220
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push esi
call fcn.0041bce6
mov esi, dword [esp + 0x14]
add esp, 4
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x1c]
mov ebx, dword [eax + 0xc]
mov dword [esp + 0x3c], 0
cmp word [ecx + 2], 2
sbb edx, edx
add ebx, dword [esp + 0x2c]
and edx, 0xfffffffc
mov dword [esp + 0x18], ebx
add edx, 0x2c
cmp dword [eax + 8], 0
mov dword [esp + 0x44], edx
jbe 0x403f58
nop dword [eax]
test byte [ebx + 4], 0x10
je 0x403b78
mov eax, dword [ebx + 0x20]
mov edx, dword [esp + 0x40]
add eax, edx
push edi
push esi
push eax
push ecx
push dword [esp + 0x3c]
mov ecx, dword [esp + 0x34]
call fcn.00403a60
add esp, 0x14
jmp 0x403f36
push 0x1000000
call fcn.00422c22
mov ebx, eax
add esp, 4
mov dword [esp + 0x28], ebx
test ebx, ebx
je 0x403f7a
mov ecx, dword [esp + 0x18]
mov ecx, dword [ecx]
add ecx, dword [esp + 0x20]
call fcn.00402220
mov esi, eax
push 0x449f1c
push esi
call fcn.0042560d
push esi
mov dword [esp + 0x3c], eax
call fcn.0041bce6
mov esi, dword [esp + 0x24]
add esp, 0xc
cmp dword [esi + 0x24], 0
je 0x403e80
mov ecx, dword [esp + 0x1c]
push dword [esp + 0x10]
mov eax, dword [ecx + 8]
add eax, dword [esi + 0x20]
mov dword [esp + 0x18], eax
call fcn.00425d02
mov ecx, dword [esp + 0x18]
add esp, 4
cmp eax, ecx
je 0x403bfb
push 0
push ecx
push dword [esp + 0x18]
call fcn.00426368
add esp, 0xc
mov edx, dword [esp + 0x1c]
cmp word [edx + 2], 2
jb 0x403d68
mov edx, dword [esi + 0x28]
cmp edx, 0xffffffff
je 0x403d64
mov eax, dword [esi + 0x24]
xor ecx, ecx
add eax, edx
setb cl
neg ecx
or ecx, eax
push ecx
call fcn.00422c22
mov ecx, dword [esp + 0x20]
add esp, 4
mov dword [esp + 0x24], eax
cmp word [ecx + 2], 5
jb 0x403cbd
mov ecx, dword [esp + 0x18]
mov esi, dword [esi + 0x24]
mov ecx, dword [ecx + 0x28]
mov dword [esp + 0x14], ecx
cmp esi, 0xffffffff
jne 0x403c69
push dword [esp + 0x10]
call fcn.00425d02
mov ecx, dword [esp + 0x18]
mov esi, eax
mov eax, dword [esp + 0x28]
add esp, 4
push dword [esp + 0x10]
push ecx
push 1
push eax
call fcn.00425f18
mov eax, 0x2aaaaaab
add esp, 0x10
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
xor edx, edx
lea eax, [eax + eax*2]
shl eax, 2
sub esi, eax
cmp dword [esp + 0x14], edx
jle 0x403d2e
mov ebx, dword [esp + 0x24]
mov al, byte [edi + esi]
xor ecx, ecx
xor byte [edx + ebx], al
inc edx
cmp esi, 0xb
lea eax, [esi + 1]
cmovne ecx, eax
mov esi, ecx
cmp edx, dword [esp + 0x14]
jl 0x403ca1
jmp 0x403d2a
mov eax, dword [esi + 0x28]
push dword [esp + 0x10]
mov dword [esp + 0x18], eax
call fcn.00425d02
push dword [esp + 0x14]
mov esi, eax
push dword [esp + 0x1c]
push 1
push dword [esp + 0x34]
call fcn.00425f18
mov eax, 0x2aaaaaab
add esp, 0x14
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
xor edx, edx
lea eax, [eax + eax*2]
shl eax, 2
sub esi, eax
cmp dword [esp + 0x14], edx
jle 0x403d2e
mov ebx, dword [esp + 0x24]
nop dword [eax]
mov al, byte [esi + edi]
xor ecx, ecx
xor byte [edx + ebx], al
inc edx
cmp esi, 0xb
lea eax, [esi + 1]
cmovne ecx, eax
mov esi, ecx
cmp edx, dword [esp + 0x14]
jl 0x403d10
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x24]
mov ecx, esi
mov edx, dword [edi + 0x28]
add edx, esi
call fcn.00403380
push dword [esp + 0x30]
mov eax, dword [edi + 0x28]
push 1
push dword [edi + 0x24]
add eax, esi
push eax
call fcn.0042545b
push esi
call fcn.00422c07
add esp, 0x14
jmp 0x403e80
mov edx, dword [esp + 0x1c]
mov eax, dword [esi + 0x24]
xor ecx, ecx
mov dword [esp + 0x28], ecx
test eax, eax
je 0x403e80
nop dword [eax]
mov edi, eax
mov esi, 0x1000000
sub edi, ecx
cmp edi, 0x1000000
cmova edi, esi
cmp word [edx + 2], 5
jb 0x403dfe
lea esi, [eax + ecx]
cmp esi, 0xffffffff
jne 0x403daf
push dword [esp + 0x10]
call fcn.00425d02
add esp, 4
mov esi, eax
push dword [esp + 0x10]
push edi
push 1
push ebx
call fcn.00425f18
mov eax, 0x2aaaaaab
add esp, 0x10
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
xor edx, edx
lea eax, [eax + eax*2]
shl eax, 2
sub esi, eax
test edi, edi
jle 0x403e53
nop dword [eax]
mov eax, dword [esp + 0x34]
xor ecx, ecx
mov al, byte [eax + esi]
xor byte [edx + ebx], al
inc edx
cmp esi, 0xb
lea eax, [esi + 1]
cmovne ecx, eax
mov esi, ecx
cmp edx, edi
jl 0x403de0
jmp 0x403e53
push dword [esp + 0x10]
call fcn.00425d02
push dword [esp + 0x14]
mov esi, eax
push edi
push 1
push ebx
call fcn.00425f18
mov eax, 0x2aaaaaab
add esp, 0x14
imul esi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
xor edx, edx
lea eax, [eax + eax*2]
shl eax, 2
sub esi, eax
test edi, edi
jle 0x403e53
mov eax, dword [esp + 0x34]
xor ecx, ecx
mov al, byte [eax + esi]
xor byte [edx + ebx], al
inc edx
cmp esi, 0xb
lea eax, [esi + 1]
cmovne ecx, eax
mov esi, ecx
cmp edx, edi
jl 0x403e37
push dword [esp + 0x30]
push 1
push edi
push ebx
call fcn.0042545b
mov esi, dword [esp + 0x28]
add esp, 0x10
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x1c]
add ecx, edi
mov dword [esp + 0x28], ecx
mov eax, dword [esi + 0x24]
cmp ecx, eax
jb 0x403d80
push dword [esp + 0x30]
call fcn.00422fd6
push ebx
call fcn.00422c07
mov ebx, dword [esp + 0x20]
add esp, 8
mov ecx, dword [ebx]
add ecx, dword [esp + 0x20]
call fcn.00402220
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.0041bce6
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 + 0x20]
call fcn.00402220
push dword [ebx + 4]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call fcn.0041bce6
mov edi, dword [esp + 0x38]
add esp, 4
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
add ebx, dword [esp + 0x44]
inc eax
mov dword [esp + 0x3c], eax
cmp eax, dword [ecx + 8]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], ebx
jb 0x403b50
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.0041badb
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.0041badb
mov esp, ebp
pop ebp
ret