Function at 0x401230
Capabilities:
Check if file exists
Create directory
Encode data using xor
Get common file path
Get disk information
Get file attributes
Get hostname
Read file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4206a1
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0xe20
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, ecx
mov dword [ebp - 0xe00], edx
mov dword [ebp - 0xe0c], edx
mov dword [ebp - 0xe18], edx
xorps xmm0, xmm0
movups xmmword [edx + 8], xmm0
mov dword [edx + 0x18], 0
mov dword [edx + 0x1c], 0xf
mov byte [edx + 8], 0
mov dword [ebp - 4], 0
movups xmmword [edx + 0x20], xmm0
mov dword [edx + 0x30], 0
mov dword [edx + 0x34], 0xf
mov byte [edx + 0x20], 0
movups xmmword [edx + 0x38], xmm0
mov dword [edx + 0x48], 0
mov dword [edx + 0x4c], 0xf
mov byte [edx + 0x38], 0
movups xmmword [edx + 0x50], xmm0
mov dword [edx + 0x60], 0
mov dword [edx + 0x64], 0xf
mov byte [edx + 0x50], 0
movups xmmword [edx + 0x68], xmm0
mov dword [edx + 0x78], 0
mov dword [edx + 0x7c], 0xf
mov byte [edx + 0x68], 0
lea esi, [edx + 0x80]
movups xmmword [esi], xmm0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov dword [ebp - 0xe0c], esi
mov byte [esi], 0
movups xmmword [edx + 0x98], xmm0
lea ecx, [edx + 0xa8]
mov dword [edx + 0xac], 0xf
mov dword [ecx], 0
mov dword [ebp - 0xe04], ecx
mov byte [edx + 0x98], 0
lea edi, [edx + 0xb0]
movups xmmword [edi], xmm0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
mov byte [edi], 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0xe14]
mov byte [ebp - 4], 7
push eax
push 0
push 0
push 0
mov byte [ebp - 0x34], 0
movups xmmword [ebp - 0x33], xmm0
mov dword [ebp - 0x1b], 0
movq qword [ebp - 0x23], xmm0
mov word [ebp - 0x17], 0
mov byte [ebp - 0x15], 0
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
push dword [ebp - 0xe14]
lea eax, [ebp - 0x34]
push 0x427c90
push eax
call fcn.00401050
add esp, 0xc
mov dword [ebp - 0xe1c], 0x200
lea eax, [ebp - 0xe1c]
push eax
lea eax, [ebp - 0x548]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
test eax, eax
jne 0x4013e5
movups xmm0, xmmword [str.errorretrieving]
movups xmmword [ebp - 0x548], xmm0
push 0x105
lea eax, [ebp - 0x240]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov ecx, dword [ebp - 0x240]
test eax, eax
lea eax, [ebp - 0x348]
mov edx, 0x727265
push eax
push 0
push 0
push 0x1a
cmove ecx, edx
push 0
mov dword [ebp - 0x240], ecx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
mov eax, dword [ebp - 0xe00]
mov ecx, 0x102
mov word [eax + 4], cx
mov eax, dword [0x427e38]
mov edx, eax
lea ecx, [edx + 1]
mov dword [ebp - 0xdfc], ecx
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x401443
sub edx, dword [ebp - 0xdfc]
mov ecx, dword [ebp - 0xe00]
push edx
push eax
lea ecx, [ecx + 0x98]
call fcn.00402fa0
xorps xmm0, xmm0
mov dword [ebp - 0xd68], 1
movups xmmword [ebp - 0xd78], xmm0
mov dword [ebp - 0xd64], 0xf
mov word [ebp - 0xd78], 0x5c
movups xmmword [ebp - 0xd60], xmm0
mov dword [ebp - 0xd50], 1
mov dword [ebp - 0xd4c], 0xf
mov word [ebp - 0xd60], 0x5c
lea eax, [ebp - 0xd60]
mov byte [ebp - 4], 9
push eax
lea edx, [ebp - 0x348]
lea ecx, [ebp - 0xdc0]
call fcn.004030e0
mov edx, eax
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0xda8]
call fcn.004031e0
add esp, 4
lea ecx, [ebp - 0xd78]
mov byte [ebp - 4], 0xb
push ecx
push eax
push dword [ebp - 0xe18]
lea ecx, [ebp - 0xd90]
call fcn.004034a0
mov byte [ebp - 4], 0xc
mov edx, dword [ebp - 0xe00]
add edx, 0x98
cmp dword [edx + 0x14], 0xf
jbe 0x401513
mov edx, dword [edx]
mov ecx, dword [ebp - 0xe04]
mov eax, dword [ebp - 0xd80]
mov dword [ebp - 0xdf8], eax
mov eax, dword [ebp - 0xd7c]
mov ecx, dword [ecx]
sub eax, dword [ebp - 0xdf8]
mov dword [ebp - 0xdfc], ecx
push ecx
push edx
cmp ecx, eax
ja 0x401585
mov esi, dword [ebp - 0xdf8]
cmp dword [ebp - 0xd7c], 0xf
lea eax, [esi + ecx]
mov dword [ebp - 0xd80], eax
lea eax, [ebp - 0xd90]
cmova eax, dword [ebp - 0xd90]
add esi, eax
push esi
call fcn.0040c280
mov eax, dword [ebp - 0xdfc]
add esp, 0xc
mov byte [esi + eax], 0
lea eax, [ebp - 0xd90]
mov esi, dword [ebp - 0xe0c]
jmp 0x40159e
mov byte [ebp - 0xe0c], 0
push dword [ebp - 0xe0c]
push ecx
lea ecx, [ebp - 0xd90]
call fcn.004038a0
movups xmm0, xmmword [eax]
movq xmm1, qword [eax + 0x10]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [ebp - 0xdf0]
movq qword [ebp - 0xe10], xmm1
movq qword [ebp - 0xde0], xmm1
movups xmmword [ebp - 0xe30], xmm0
movups xmmword [ebp - 0xdf0], xmm0
cmp esi, eax
je 0x401648
mov ecx, dword [esi + 0x14]
cmp ecx, 0xf
jbe 0x401621
mov eax, dword [esi]
inc ecx
cmp ecx, 0x1000
jb 0x401608
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e4d
mov eax, edx
push ecx
push eax
call fcn.004094ef
movups xmm0, xmmword [ebp - 0xe30]
add esp, 8
movq xmm1, qword [ebp - 0xe10]
mov dword [esi + 0x10], 0
mov ecx, 0xf
mov dword [esi + 0x14], 0xf
mov byte [esi], 0
movups xmmword [esi], xmm0
mov byte [ebp - 0xdf0], 0
movq qword [esi + 0x10], xmm1
jmp 0x40164e
mov ecx, dword [ebp - 0xddc]
cmp ecx, 0xf
jbe 0x401682
mov edx, dword [ebp - 0xdf0]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401678
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e4d
push ecx
push edx
call fcn.004094ef
add esp, 8
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0xd7c]
cmp ecx, 0xf
jbe 0x4016c0
mov edx, dword [ebp - 0xd90]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4016b6
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e4d
push ecx
push edx
call fcn.004094ef
add esp, 8
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0xd94]
mov dword [ebp - 0xd80], 0
mov dword [ebp - 0xd7c], 0xf
mov byte [ebp - 0xd90], 0
cmp ecx, 0xf
jbe 0x401719
mov edx, dword [ebp - 0xda8]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40170f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e4d
push ecx
push edx
call fcn.004094ef
add esp, 8
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0xdac]
mov dword [ebp - 0xd98], 0
mov dword [ebp - 0xd94], 0xf
mov byte [ebp - 0xda8], 0
cmp ecx, 0xf
jbe 0x401772
mov edx, dword [ebp - 0xdc0]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401768
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e4d
push ecx
push edx
call fcn.004094ef
add esp, 8
mov byte [ebp - 4], 8
mov ecx, dword [ebp - 0xd4c]
mov dword [ebp - 0xdb0], 0
mov dword [ebp - 0xdac], 0xf
mov byte [ebp - 0xdc0], 0
cmp ecx, 0xf
jbe 0x4017cb
mov edx, dword [ebp - 0xd60]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4017c1
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e4d
push ecx
push edx
call fcn.004094ef
add esp, 8
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0xd64]
mov dword [ebp - 0xd50], 0
mov dword [ebp - 0xd4c], 0xf
mov byte [ebp - 0xd60], 0
cmp ecx, 0xf
jbe 0x401824
mov edx, dword [ebp - 0xd78]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40181a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e4d
push ecx
push edx
call fcn.004094ef
add esp, 8
xorps xmm0, xmm0
mov dword [ebp - 0xd68], 1
movups xmmword [ebp - 0xd78], xmm0
mov dword [ebp - 0xd64], 0xf
mov word [ebp - 0xd78], 0x5c
movups xmmword [ebp - 0xd60], xmm0
mov dword [ebp - 0xd50], 1
mov dword [ebp - 0xd4c], 0xf
mov word [ebp - 0xd60], 0x5c
lea eax, [ebp - 0xd60]
mov byte [ebp - 4], 0xe
push eax
lea edx, [ebp - 0x348]
lea ecx, [ebp - 0xda8]
call fcn.004030e0
mov edx, eax
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0xdc0]
call fcn.004031e0
add esp, 4
lea ecx, [ebp - 0xd78]
mov byte [ebp - 4], 0x10
push ecx
push eax
push dword [ebp - 0xe18]
lea ecx, [ebp - 0xdd8]
call fcn.004034a0
lea eax, [ebp - 0xdd8]
cmp edi, eax
je 0x40192f
mov ecx, dword [edi + 0x14]
cmp ecx, 0xf
jbe 0x4018f9
mov eax, dword [edi]
inc ecx
cmp ecx, 0x1000
jb 0x4018ef
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e52
mov eax, edx
push ecx
push eax
call fcn.004094ef
add esp, 8
movups xmm0, xmmword [ebp - 0xdd8]
mov dword [edi + 0x10], 0
mov ecx, 0xf
mov dword [edi + 0x14], 0xf
mov byte [edi], 0
movups xmmword [edi], xmm0
mov byte [ebp - 0xdd8], 0
movq xmm0, qword [ebp - 0xdc8]
movq qword [edi + 0x10], xmm0
jmp 0x401935
mov ecx, dword [ebp - 0xdc4]
cmp ecx, 0xf
jbe 0x401969
mov edx, dword [ebp - 0xdd8]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40195f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e52
push ecx
push edx
call fcn.004094ef
add esp, 8
mov byte [ebp - 4], 0xf
mov ecx, dword [ebp - 0xdac]
cmp ecx, 0xf
jbe 0x4019a7
mov edx, dword [ebp - 0xdc0]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40199d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e52
push ecx
push edx
call fcn.004094ef
add esp, 8
mov byte [ebp - 4], 0xe
mov ecx, dword [ebp - 0xd94]
mov dword [ebp - 0xdb0], 0
mov dword [ebp - 0xdac], 0xf
mov byte [ebp - 0xdc0], 0
cmp ecx, 0xf
jbe 0x401a00
mov edx, dword [ebp - 0xda8]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4019f6
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e52
push ecx
push edx
call fcn.004094ef
add esp, 8
mov byte [ebp - 4], 0xd
mov ecx, dword [ebp - 0xd4c]
mov dword [ebp - 0xd98], 0
mov dword [ebp - 0xd94], 0xf
mov byte [ebp - 0xda8], 0
cmp ecx, 0xf
jbe 0x401a59
mov edx, dword [ebp - 0xd60]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401a4f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e52
push ecx
push edx
call fcn.004094ef
add esp, 8
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0xd64]
mov dword [ebp - 0xd50], 0
mov dword [ebp - 0xd4c], 0xf
mov byte [ebp - 0xd60], 0
cmp ecx, 0xf
jbe 0x401ab2
mov edx, dword [ebp - 0xd78]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401aa8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401e52
push ecx
push edx
call fcn.004094ef
add esp, 8
cmp dword [edi + 0x14], 0xf
jbe 0x401aba
mov edi, dword [edi]
mov ecx, edi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401ac0
sub ecx, edx
cmp ecx, 0x400
jae 0x401b5d
push 0x400
lea eax, [ebp - 0x948]
push edi
push eax
call fcn.0040fab0
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea ecx, [ebp - 0x948]
mov dl, 1
add esp, 0xc
mov byte [ebp - 0xdf1], dl
nop
mov al, byte [ecx]
mov esi, ecx
cmp al, 0x5c
je 0x401b14
test al, al
je 0x401b5d
mov al, byte [esi + 1]
inc esi
cmp al, 0x5c
jne 0x401b08
test esi, esi
je 0x401b5d
cmp esi, ecx
je 0x401b56
lea eax, [ebp - 0x948]
mov byte [esi], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x401b35
test al, 0x10
jne 0x401b4d
push 0
lea eax, [ebp - 0x948]
push eax
call edi
test eax, eax
setne dl
mov byte [ebp - 0xdf1], dl
jmp 0x401b53
mov dl, byte [ebp - 0xdf1]
mov byte [esi], 0x5c
lea ecx, [esi + 1]
test dl, dl
jne 0x401b00
push ecx
lea eax, [ebp - 0x34]
push eax
call fcn.00401e60
push 0
push 0x1a
lea eax, [ebp - 0xd48]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea ecx, [ebp - 0xd48]
dec ecx
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x401b81
mov eax, dword [0x427cb0]
mov dword [ecx], eax
mov eax, dword [0x427cb4]
mov dword [ecx + 4], eax
lea eax, [ebp - 0x240]
push 0x427cb8
push eax
call fcn.0040d3f5
push 2
mov esi, eax
push 0
push esi
call fcn.0040d852
add esp, 0x14
push esi
call fcn.0040d2db
add esp, 4
mov edi, eax
mov dword [ebp - 0xdf8], edi
push 0
push 0
push esi
call fcn.0040d852
add esp, 0xc
push edi
call fcn.004104d0
add esp, 4
mov dword [ebp - 0xdfc], eax
push esi
push edi
push 1
push eax
call fcn.00410109
push esi
call fcn.0040d531
movaps xmm1, xmmword [0x4284b0]
add esp, 0x14
movaps xmm2, xmmword [0x4284c0]
xor esi, esi
mov dword [ebp - 0xe04], 0
xor ecx, ecx
nop word [eax + eax]
movd xmm0, ecx
lea eax, [ecx + 4]
pshufd xmm0, xmm0, 0
paddd xmm0, xmm1
andps xmm0, xmm2
packuswb xmm0, xmm0
packuswb xmm0, xmm0
movd dword [ebp + ecx - 0x138], xmm0
movd xmm0, eax
lea eax, [ecx + 8]
pshufd xmm0, xmm0, 0
paddd xmm0, xmm1
andps xmm0, xmm2
packuswb xmm0, xmm0
packuswb xmm0, xmm0
movd dword [ebp + ecx - 0x134], xmm0
movd xmm0, eax
lea eax, [ecx + 0xc]
pshufd xmm0, xmm0, 0
paddd xmm0, xmm1
andps xmm0, xmm2
packuswb xmm0, xmm0
packuswb xmm0, xmm0
movd dword [ebp + ecx - 0x130], xmm0
movd xmm0, eax
pshufd xmm0, xmm0, 0
paddd xmm0, xmm1
andps xmm0, xmm2
packuswb xmm0, xmm0
packuswb xmm0, xmm0
movd dword [ebp + ecx - 0x12c], xmm0
add ecx, 0x10
cmp ecx, 0x100
jl 0x401c20
xor edi, edi
nop
mov dl, byte [ebp + edi - 0x138]
movsx eax, byte [esi + str.Password]
inc esi
add eax, dword [ebp - 0xe04]
movzx ecx, dl
add ecx, eax
movzx ecx, cl
mov dword [ebp - 0xe04], ecx
mov al, byte [ebp + ecx - 0x138]
mov byte [ebp + edi - 0x138], al
mov byte [ebp + ecx - 0x138], dl
and esi, 0x80000007
jns 0x401d05
dec esi
or esi, 0xfffffff8
inc esi
inc edi
cmp edi, 0x100
jl 0x401cc0
xor edx, edx
cmp dword [ebp - 0xdf8], edx
jle 0x401d69
xor esi, esi
xor edi, edi
nop dword [eax]
lea eax, [esi + 1]
movzx esi, al
mov cl, byte [ebp + esi - 0x138]
movzx eax, cl
add eax, edi
movzx edi, al
mov al, byte [ebp + edi - 0x138]
mov byte [ebp + esi - 0x138], al
mov byte [ebp + edi - 0x138], cl
add cl, al
movzx eax, cl
mov ecx, dword [ebp - 0xdfc]
movzx eax, byte [ebp + eax - 0x138]
xor byte [edx + ecx], al
inc edx
cmp edx, dword [ebp - 0xdf8]
jl 0x401d20
lea eax, [ebp - 0xd48]
push 0x427cc8
push eax
call fcn.0040d3f5
mov esi, eax
push esi
push dword [ebp - 0xdf8]
push 1
push dword [ebp - 0xdfc]
call fcn.0040fe86
push esi
call fcn.0040d531
mov edi, dword [ebp - 0xe00]
lea edx, [ebp - 0x34]
mov eax, dword [ebp - 0xe14]
lea esi, [edx + 1]
add esp, 0x1c
mov dword [edi], eax
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x401db0
sub edx, esi
lea eax, [ebp - 0x34]
push edx
push eax
lea ecx, [edi + 0x20]
call fcn.00402fa0
lea edx, [ebp - 0x548]
lea esi, [edx + 1]
nop
mov al, byte [edx]
inc edx
test al, al
jne 0x401dd0
sub edx, esi
lea eax, [ebp - 0x548]
push edx
push eax
lea ecx, [edi + 0x38]
call fcn.00402fa0
lea edx, [ebp - 0x240]
lea esi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x401df2
sub edx, esi
lea eax, [ebp - 0x240]
push edx
push eax
lea ecx, [edi + 0x68]
call fcn.00402fa0
lea edx, [ebp - 0x348]
lea esi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x401e14
sub edx, esi
lea eax, [ebp - 0x348]
push edx
push eax
lea ecx, [edi + 0x50]
call fcn.00402fa0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004094b1
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.00410479
call fcn.00410479
int3