Function at 0x459070
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 [0x4f0100]
xor eax, esp
mov dword [esp + 0x260], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x18]
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 0xc]
push esi
mov dword [esp + 0x24], eax
mov esi, ecx
mov eax, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0x14]
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x60]
push eax
push 0x104
mov dword [esp + 0x48], edx
mov dword [esp + 0x38], esi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x3c], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov edx, dword [esp + 0x3c]
mov eax, dword [edx]
cmp eax, 0xffffffff
je 0x4591e5
cmp dword [edx + 4], 0xffffffff
je 0x4591e5
add eax, dword [esp + 0x38]
mov dword [esp + 0x24], eax
mov ecx, dword [eax]
movzx eax, word [ecx + esi]
add ecx, esi
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 0x459102
sub ecx, edx
mov dword [esp + 0x2c], ecx
lea eax, [ecx + 1]
mov ecx, 2
mul ecx
mov ecx, 0xffffffff
mov esi, eax
cmovb esi, ecx
push esi
call fcn.0047bdec
push esi
mov edi, eax
push 0
push edi
call fcn.0047d590
add esp, 0x10
push dword [esp + 0x2c]
push edi
push 0xffffffffffffffff
push dword [esp + 0x1c]
push 0
push 0x3a4
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push edi
call fcn.0047b4f0
mov ecx, dword [esp + 0x28]
add esp, 4
mov ecx, dword [ecx]
add ecx, dword [esp + 0x30]
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 0x459180
sub ecx, edx
mov dword [esp + 0x2c], ecx
lea eax, [ecx + 1]
mov ecx, 2
mul ecx
mov esi, eax
mov eax, 0xffffffff
cmovb esi, eax
push esi
call fcn.0047bdec
push esi
mov edi, eax
push 0
push edi
call fcn.0047d590
add esp, 0x10
push dword [esp + 0x2c]
push edi
push 0xffffffffffffffff
push dword [esp + 0x1c]
push 0
push 0x3a4
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push edi
call fcn.0047b4f0
mov edi, dword [esp + 0x18]
add esp, 4
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x28]
mov esi, dword [edx + 0xc]
mov dword [esp + 0x2c], 0
cmp word [ecx + 2], 2
sbb eax, eax
add esi, dword [esp + 0x38]
and eax, 0xfffffffc
mov dword [esp + 0x18], esi
add eax, 0x2c
cmp dword [edx + 8], 0
mov dword [esp + 0x44], eax
jbe 0x45971e
test byte [esi + 4], 0x10
je 0x45923f
mov eax, dword [esi + 0x20]
mov edx, dword [esp + 0x40]
add eax, edx
push ebx
push edi
push eax
push ecx
push dword [esp + 0x48]
mov ecx, dword [esp + 0x44]
call fcn.00459070
add esp, 0x14
jmp 0x4596fc
push 0x1000000
call fcn.0048b49b
mov ebx, eax
add esp, 4
mov dword [esp + 0x10], ebx
test ebx, ebx
je 0x459740
mov edx, dword [esi]
add edx, dword [esp + 0x30]
movzx ecx, word [edx]
inc ecx
lea eax, [edx + ecx*4]
mov ecx, eax
mov dword [esp + 0x20], eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x459270
sub ecx, edx
mov dword [esp + 0x24], ecx
lea eax, [ecx + 1]
mov ecx, 2
mul ecx
mov esi, eax
mov eax, 0xffffffff
cmovb esi, eax
push esi
call fcn.0047bdec
push esi
mov edi, eax
push 0
push edi
call fcn.0047d590
add esp, 0x10
push dword [esp + 0x24]
push edi
push 0xffffffffffffffff
push dword [esp + 0x2c]
push 0
push 0x3a4
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0x4deb74
push edi
call fcn.0048c5b4
push edi
mov dword [esp + 0x30], eax
call fcn.0047b4f0
mov esi, dword [esp + 0x24]
add esp, 0xc
cmp dword [esi + 0x24], 0
je 0x45959c
mov eax, dword [esp + 0x28]
mov edi, dword [esp + 0x14]
push edi
mov eax, dword [eax + 8]
add eax, dword [esi + 0x20]
mov dword [esp + 0x24], eax
call fcn.0048c40c
mov ecx, dword [esp + 0x24]
add esp, 4
cmp eax, ecx
je 0x459312
push 0
push ecx
push edi
call fcn.0048b1db
add esp, 0xc
mov eax, dword [esp + 0x28]
cmp word [eax + 2], 2
jb 0x459486
mov ecx, dword [esi + 0x28]
cmp ecx, 0xffffffff
je 0x459486
mov eax, dword [esi + 0x24]
add eax, ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0048b49b
mov edi, eax
add esp, 4
mov eax, dword [esp + 0x28]
mov dword [esp + 0x20], edi
cmp word [eax + 2], 5
jb 0x4593dc
mov eax, dword [esp + 0x18]
mov esi, dword [esi + 0x24]
mov eax, dword [eax + 0x28]
mov dword [esp + 0x1c], eax
cmp esi, 0xffffffff
jne 0x45937d
push dword [esp + 0x14]
call fcn.0048c40c
mov esi, eax
add esp, 4
mov eax, dword [esp + 0x1c]
push dword [esp + 0x14]
push eax
push 1
push edi
call fcn.0048ae0c
mov eax, 0x2aaaaaab
xor edi, edi
imul esi
add esp, 0x10
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
shl eax, 2
sub esi, eax
cmp dword [esp + 0x1c], edi
jle 0x45944e
mov edx, dword [esp + 0x34]
mov ebx, dword [esp + 0x20]
nop dword [eax]
mov al, byte [edx + esi]
xor ecx, ecx
xor byte [ebx + edi], al
inc edi
cmp esi, 0xb
lea eax, [esi + 1]
cmovne ecx, eax
mov esi, ecx
cmp edi, dword [esp + 0x1c]
jl 0x4593c0
jmp 0x45944a
mov eax, dword [esi + 0x28]
push dword [esp + 0x14]
mov dword [esp + 0x20], eax
call fcn.0048c40c
push dword [esp + 0x18]
mov esi, eax
push dword [esp + 0x24]
push 1
push edi
call fcn.0048ae0c
mov eax, 0x2aaaaaab
xor edi, edi
imul esi
add esp, 0x14
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*2]
shl eax, 2
sub esi, eax
cmp dword [esp + 0x1c], edi
jle 0x45944e
mov edx, dword [esp + 0x34]
mov ebx, dword [esp + 0x20]
nop dword [eax]
mov al, byte [esi + edx]
xor ecx, ecx
xor byte [ebx + edi], al
inc edi
cmp esi, 0xb
lea eax, [esi + 1]
cmovne ecx, eax
mov esi, ecx
cmp edi, dword [esp + 0x1c]
jl 0x459430
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x20]
mov ecx, esi
mov edx, dword [edi + 0x28]
add edx, esi
call fcn.00456020
push dword [esp + 0x24]
mov eax, dword [edi + 0x28]
push 1
push dword [edi + 0x24]
add eax, esi
push eax
call fcn.00485546
push esi
call fcn.0048aa64
add esp, 0x14
mov esi, edi
jmp 0x45959c
mov ecx, dword [esi + 0x24]
xor edx, edx
mov dword [esp + 0x10], edx
test ecx, ecx
je 0x45959c
mov eax, ecx
sub eax, edx
cmp eax, 0x1000000
jbe 0x4594a9
mov edi, 0x1000000
jmp 0x4594ad
mov edi, ecx
sub edi, edx
mov eax, dword [esp + 0x28]
cmp word [eax + 2], 5
jb 0x45951e
lea esi, [ecx + edx]
cmp esi, 0xffffffff
jne 0x4594ce
push dword [esp + 0x14]
call fcn.0048c40c
add esp, 4
mov esi, eax
push dword [esp + 0x14]
push edi
push 1
push ebx
call fcn.0048ae0c
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 0x459573
nop dword [eax]
mov eax, dword [esp + 0x34]
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 0x459500
jmp 0x459573
push dword [esp + 0x14]
call fcn.0048c40c
push dword [esp + 0x18]
mov esi, eax
push edi
push 1
push ebx
call fcn.0048ae0c
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 0x459573
mov eax, dword [esp + 0x34]
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 0x459557
push dword [esp + 0x24]
push 1
push edi
push ebx
call fcn.00485546
mov esi, dword [esp + 0x28]
add esp, 0x10
mov edx, dword [esp + 0x10]
add edx, edi
mov dword [esp + 0x10], edx
mov ecx, dword [esi + 0x24]
cmp edx, ecx
jb 0x459497
push dword [esp + 0x24]
call fcn.00483fbe
push ebx
call fcn.0048aa64
mov ecx, dword [esi]
add esp, 8
add ecx, dword [esp + 0x30]
movzx eax, word [ecx]
add ecx, 4
lea eax, [ecx + eax*4]
mov ebx, eax
mov dword [esp + 0x10], eax
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x4595c6
sub ebx, ecx
mov ecx, 2
lea eax, [ebx + 1]
mul ecx
mov esi, eax
mov eax, 0xffffffff
cmovb esi, eax
push esi
call fcn.0047bdec
push esi
mov edi, eax
push 0
push edi
call fcn.0047d590
add esp, 0x10
push ebx
push edi
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 edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push edi
mov esi, eax
call fcn.0047b4f0
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 + 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 esi
mov dword [esp + 0x68], edx
mov dword [esp + 0x58], ecx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx]
add ecx, dword [esp + 0x30]
movzx eax, word [ecx]
add ecx, 4
lea eax, [ecx + eax*4]
mov ebx, eax
mov dword [esp + 0x10], eax
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x459693
sub ebx, ecx
mov ecx, 2
lea eax, [ebx + 1]
mul ecx
mov esi, eax
mov eax, 0xffffffff
cmovb esi, eax
push esi
call fcn.0047bdec
push esi
mov edi, eax
push 0
push edi
call fcn.0047d590
add esp, 0x10
push ebx
push edi
push 0xffffffffffffffff
push dword [esp + 0x1c]
push 0
push 0x3a4
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, dword [esp + 0x18]
mov eax, dword [esi + 4]
and eax, 0xfffffff9
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push edi
call fcn.0047b4f0
mov ebx, dword [esp + 0x38]
add esp, 4
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x2c]
add esi, dword [esp + 0x44]
inc eax
mov dword [esp + 0x2c], eax
cmp eax, dword [ecx + 8]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x18], esi
jb 0x459217
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.0047b4e2
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.0047b4e2
mov esp, ebp
pop ebp
ret