Function at 0x450150
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, 0x25c
mov eax, dword [0x4e20c0]
xor eax, esp
mov dword [esp + 0x258], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [esp + 0x24], eax
mov ebx, ecx
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x14]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0x18]
mov dword [esp + 0x34], eax
lea eax, [esp + 0x58]
push eax
push 0x104
mov dword [esp + 0x40], edx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x38], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov edx, dword [esp + 0x34]
mov eax, dword [edx]
cmp eax, 0xffffffff
je 0x4502c4
cmp dword [edx + 4], 0xffffffff
je 0x4502c4
add eax, dword [esp + 0x2c]
mov dword [esp + 0xc], eax
mov ecx, dword [eax]
movzx eax, word [ecx + ebx]
add ecx, ebx
add ecx, 4
lea eax, [ecx + eax*4]
mov ecx, eax
mov dword [esp + 0x10], eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4501e2
sub ecx, edx
xor ebx, ebx
mov dword [esp + 0x20], ecx
lea eax, [ecx + 1]
mov ecx, 2
mul ecx
seto bl
neg ebx
or ebx, eax
push ebx
call fcn.0046f550
push ebx
mov esi, eax
push 0
push esi
call fcn.004709e0
add esp, 0x10
push dword [esp + 0x20]
push esi
push 0xffffffffffffffff
push dword [esp + 0x1c]
push 0
push 0x3a4
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push esi
call fcn.0046ea83
mov ecx, dword [esp + 0x10]
add esp, 4
mov ecx, dword [ecx]
add ecx, dword [esp + 0x24]
movzx eax, word [ecx]
add ecx, 4
lea eax, [ecx + eax*4]
mov ecx, eax
mov dword [esp + 0x10], eax
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x450260
sub ecx, edx
xor ebx, ebx
mov dword [esp + 0x20], ecx
lea eax, [ecx + 1]
mov ecx, 2
mul ecx
seto bl
neg ebx
or ebx, eax
push ebx
call fcn.0046f550
push ebx
mov esi, eax
push 0
push esi
call fcn.004709e0
add esp, 0x10
push dword [esp + 0x20]
push esi
push 0xffffffffffffffff
push dword [esp + 0x1c]
push 0
push 0x3a4
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push esi
call fcn.0046ea83
mov esi, dword [esp + 0x18]
add esp, 4
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x1c]
mov ebx, dword [edx + 0xc]
mov dword [esp + 0x20], 0
cmp word [ecx + 2], 2
sbb eax, eax
add ebx, dword [esp + 0x2c]
and eax, 0xfffffffc
mov dword [esp + 0x18], ebx
add eax, 0x2c
cmp dword [edx + 8], 0
mov dword [esp + 0x3c], eax
jbe 0x4506bc
test byte [ebx + 4], 0x10
je 0x45031e
mov eax, dword [ebx + 0x20]
mov edx, dword [esp + 0x38]
add eax, edx
push edi
push esi
push eax
push ecx
push dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
call fcn.00450150
add esp, 0x14
jmp 0x45069a
push 0x1000000
call fcn.0047d47d
add esp, 4
mov dword [esp + 0x28], eax
test eax, eax
je 0x450801
mov edx, dword [ebx]
add edx, dword [esp + 0x24]
movzx ecx, word [edx]
inc ecx
lea eax, [edx + ecx*4]
mov ecx, eax
mov dword [esp + 0xc], eax
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x450350
sub ecx, edx
xor ebx, ebx
mov dword [esp + 0x10], ecx
lea eax, [ecx + 1]
mov ecx, 2
mul ecx
seto bl
neg ebx
or ebx, eax
push ebx
call fcn.0046f550
push ebx
mov esi, eax
push 0
push esi
call fcn.004709e0
add esp, 0x10
push dword [esp + 0x10]
push esi
push 0xffffffffffffffff
push dword [esp + 0x18]
push 0
push 0x3a4
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0x4d07e0
push esi
call fcn.0047de88
push esi
mov dword [esp + 0x1c], eax
call fcn.0046ea83
mov esi, dword [esp + 0x24]
add esp, 0xc
cmp dword [esi + 0x24], 0
je 0x450538
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x14]
push ebx
mov eax, dword [eax + 8]
add eax, dword [esi + 0x20]
mov dword [esp + 0x10], eax
call fcn.0047e588
mov ecx, dword [esp + 0x10]
add esp, 4
cmp eax, ecx
je 0x4503f1
push 0
push ecx
push ebx
call fcn.0047d1bd
add esp, 0xc
mov eax, dword [esp + 0x1c]
cmp word [eax + 2], 2
jb 0x4506de
mov edx, dword [esi + 0x28]
cmp edx, 0xffffffff
je 0x4506de
mov eax, dword [esi + 0x24]
xor ecx, ecx
add eax, edx
setb cl
neg ecx
or ecx, eax
push ecx
call fcn.0047d47d
mov ebx, eax
add esp, 4
mov eax, dword [esp + 0x1c]
cmp word [eax + 2], 5
jb 0x4504ac
mov eax, dword [esp + 0x18]
mov esi, dword [esi + 0x24]
mov eax, dword [eax + 0x28]
mov dword [esp + 0xc], eax
cmp esi, 0xffffffff
jne 0x450455
push dword [esp + 0x14]
call fcn.0047e588
mov esi, eax
add esp, 4
mov eax, dword [esp + 0xc]
push dword [esp + 0x14]
push eax
push 1
push ebx
call fcn.0047cdee
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 + 0xc], edx
jle 0x45050b
nop dword [eax]
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 + 0xc]
jl 0x450490
jmp 0x45050b
mov eax, dword [esi + 0x28]
push dword [esp + 0x14]
mov dword [esp + 0x10], eax
call fcn.0047e588
push dword [esp + 0x18]
mov esi, eax
push dword [esp + 0x14]
push 1
push ebx
call fcn.0047cdee
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 + 0xc], edx
jle 0x45050b
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 + 0xc]
jl 0x4504f1
mov esi, dword [esp + 0x18]
mov ecx, ebx
mov edx, dword [esi + 0x28]
add edx, ebx
call fcn.0044f790
push dword [esp + 0x10]
mov eax, dword [esi + 0x28]
push 1
push dword [esi + 0x24]
add eax, ebx
push eax
call fcn.00478986
push ebx
call fcn.0047ca46
add esp, 0x14
mov ebx, dword [esp + 0x28]
push dword [esp + 0x10]
call fcn.004773fe
push ebx
call fcn.0047ca46
mov ecx, dword [esi]
add esp, 8
add ecx, dword [esp + 0x24]
movzx eax, word [ecx]
add ecx, 4
lea eax, [ecx + eax*4]
mov edi, eax
mov dword [esp + 0x10], eax
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x450566
sub edi, ecx
xor ebx, ebx
mov ecx, 2
lea eax, [edi + 1]
mul ecx
seto bl
neg ebx
or ebx, eax
push ebx
call fcn.0046f550
push ebx
mov esi, eax
push 0
push esi
call fcn.004709e0
add esp, 0x10
push edi
push esi
push 0xffffffffffffffff
push dword [esp + 0x1c]
push 0
push 0x3a4
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0x80
push 3
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push esi
mov edi, eax
call fcn.0046ea83
mov ebx, dword [esp + 0x1c]
add esp, 4
mov eax, dword [ebx + 0x14]
mov ecx, dword [ebx + 0xc]
mov edx, dword [ebx + 8]
mov dword [esp + 0x4c], eax
mov eax, dword [ebx + 0x1c]
mov dword [esp + 0x44], eax
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x4c]
mov dword [esp + 0x58], ecx
mov ecx, dword [ebx + 0x10]
push eax
lea eax, [esp + 0x58]
mov dword [esp + 0x50], ecx
mov ecx, dword [ebx + 0x18]
push eax
push edi
mov dword [esp + 0x60], edx
mov dword [esp + 0x50], 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 + 0x24]
movzx eax, word [ecx]
add ecx, 4
lea eax, [ecx + eax*4]
mov edi, eax
mov dword [esp + 0x10], eax
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x450632
sub edi, ecx
xor ebx, ebx
mov ecx, 2
lea eax, [edi + 1]
mul ecx
seto bl
neg ebx
or ebx, eax
push ebx
call fcn.0046f550
push ebx
mov esi, eax
push 0
push esi
call fcn.004709e0
add esp, 0x10
push edi
push esi
push 0xffffffffffffffff
push dword [esp + 0x1c]
push 0
push 0x3a4
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, dword [esp + 0x18]
mov eax, dword [ebx + 4]
and eax, 0xfffffff9
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call fcn.0046ea83
mov edi, dword [esp + 0x34]
add esp, 4
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x20]
add ebx, dword [esp + 0x3c]
inc eax
mov dword [esp + 0x20], eax
cmp eax, dword [ecx + 8]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x18], ebx
jb 0x4502f6
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x258]
xor ecx, esp
call fcn.0046ea75
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0x24]
xor edx, edx
mov dword [esp + 0xc], edx
test ecx, ecx
je 0x450538
mov ebx, dword [esp + 0x28]
mov eax, ecx
sub eax, edx
cmp eax, 0x1000000
jbe 0x450705
mov edi, 0x1000000
jmp 0x450709
mov edi, ecx
sub edi, edx
mov eax, dword [esp + 0x1c]
cmp word [eax + 2], 5
jb 0x45077e
lea esi, [ecx + edx]
cmp esi, 0xffffffff
jne 0x45072a
push dword [esp + 0x14]
call fcn.0047e588
add esp, 4
mov esi, eax
push dword [esp + 0x14]
push edi
push 1
push ebx
call fcn.0047cdee
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 0x4507d3
nop dword [eax + eax]
mov eax, dword [esp + 0x30]
xor ecx, ecx
mov al, byte [eax + esi]
xor byte [ebx + edx], al
inc edx
cmp esi, 0xb
lea eax, [esi + 1]
cmovne ecx, eax
mov esi, ecx
cmp edx, edi
jl 0x450760
jmp 0x4507d3
push dword [esp + 0x14]
call fcn.0047e588
push dword [esp + 0x18]
mov esi, eax
push edi
push 1
push ebx
call fcn.0047cdee
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 0x4507d3
mov eax, dword [esp + 0x30]
xor ecx, ecx
mov al, byte [eax + esi]
xor byte [ebx + edx], al
inc edx
cmp esi, 0xb
lea eax, [esi + 1]
cmovne ecx, eax
mov esi, ecx
cmp edx, edi
jl 0x4507b7
push dword [esp + 0x10]
push 1
push edi
push ebx
call fcn.00478986
mov esi, dword [esp + 0x28]
add esp, 0x10
mov edx, dword [esp + 0xc]
add edx, edi
mov dword [esp + 0xc], edx
mov ecx, dword [esi + 0x24]
cmp edx, ecx
jb 0x4506f3
jmp 0x45053c
mov ecx, dword [esp + 0x264]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0046ea75
mov esp, ebp
pop ebp
ret