Function at 0x18002d4e0
Capabilities:
Encode data using base64
Encode data using xor
Write file on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], r8
mov qword [rax + 8], rcx
push rbp
push rdi
lea rbp, [rax - 0x5f]
sub rsp, 0xe8
xor edi, edi
mov qword [rax + 0x10], rbx
mov qword [rax - 0x18], rsi
lea rcx, [rbp - 0x59]
mov qword [rax - 0x20], r12
mov rsi, r8
mov qword [rax - 0x28], r13
mov r13d, edx
lea rdx, [0x18003a3e0]
mov qword [rax - 0x38], r15
mov dword [rbp - 0x31], edi
mov qword [rbp - 0x29], rdi
mov qword [rbp - 0x39], rdi
mov qword [rbp - 0x49], rdi
mov dword [rbp - 0x41], 7
mov qword [rbp - 0x59], rdi
mov dword [rbp - 0x51], edi
call fcn.18001bef0
mov edx, dword [rbp - 0x51]
and edx, 0x1fffffff
je 0x18002d6b5
mov rcx, qword [rbp - 0x59]
mov eax, dword [rcx]
cmp eax, 0x4e534942
jne 0x18002d562
mov r12b, 1
jmp 0x18002d570
and eax, 0x80808080
cmp eax, 0x80808080
sete r12b
cmp edx, 3
jb 0x18002d6bd
mov eax, dword [rbp - 0x41]
cmp eax, 6
jne 0x18002d59f
mov rax, qword [rbp - 0x29]
test rax, rax
je 0x18002d5f1
sub rax, 4
lea rcx, [rbp - 0x29]
xor edx, edx
mov qword [rbp - 0x29], rax
call fcn.18000af20
jmp 0x18002d5ed
add eax, 0xfffffff9
cmp eax, 1
ja 0x18002d5f1
mov rdx, qword [rbp - 0x29]
test rdx, rdx
je 0x18002d5f1
mov ebx, edi
cmp dword [rbp - 0x31], ebx
jbe 0x18002d5de
nop word [rax + rax]
mov eax, ebx
lea rcx, [rax + rax*4]
lea rcx, [rdx + rcx*8]
xor edx, edx
call fcn.180012b50
inc ebx
cmp ebx, dword [rbp - 0x31]
jae 0x18002d5de
mov rdx, qword [rbp - 0x29]
jmp 0x18002d5c0
xor edx, edx
lea rcx, [rbp - 0x29]
call fcn.18000af20
mov qword [rbp - 0x29], rdi
mov rcx, qword [rbp - 0x59]
mov dword [rbp - 0x31], edi
mov eax, dword [rcx]
cmp eax, 0x4e534942
je 0x18002d68b
and eax, 0x80808080
cmp eax, 0x80808080
jne 0x18002d6a0
mov r10d, dword [rbp - 0x51]
lea r11, [rcx + 4]
and r10d, 0x1fffffff
mov r9d, edi
sub r10d, 4
mov eax, r10d
movzx ecx, r10b
shr eax, 8
movzx ebx, al
imul ebx, ecx
test r10d, r10d
je 0x18002d68b
nop dword [rax]
movzx eax, r9b
movzx ecx, bl
and al, 0x7e
lea r11, [r11 + 1]
movzx r8d, al
imul r8d, ecx
movzx ecx, byte [r11 - 1]
movzx eax, cl
add r8b, r9b
sub al, r8b
add cl, r8b
test r9b, 1
movzx r8d, cl
movzx eax, al
cmove r8d, eax
inc r9d
xor r8b, bl
not r8b
add r8b, 0x3d
mov byte [r11 - 1], r8b
cmp r9d, r10d
jb 0x18002d640
mov r8d, 4
lea rdx, [rbp - 0x59]
lea rcx, [rbp - 0x49]
call fcn.18001a340
jmp 0x18002d6bd
xor r9d, r9d
lea rdx, [rbp - 0x59]
xor r8d, r8d
lea rcx, [rbp - 0x49]
call fcn.18001a640
jmp 0x18002d6bd
movzx r12d, byte [reloc.WS2_32.dll_accept]
movabs rcx, 0x5b2e97076512942d
lea r8, [rbp - 0x49]
movabs rax, 0x5b2ef26b027cfb69
lea rdx, [rbp - 0x21]
mov qword [rbp - 0x21], rax
mov rax, qword [rbp - 0x21]
xor rax, rcx
mov ecx, 0x3e9
mov qword [rbp - 0x21], rax
call fcn.18000a220
mov rbx, rax
mov r10, rdi
movabs rax, 0x104be366137be67d
movabs r11, 0x549a2d1f135dad7a
mov qword [rbp + 0xf], rax
movabs rax, 0x50b56cba5c6eed2f
mov qword [rbp + 0x17], rax
nop
mov rax, qword [rbp + r10*8 + 0xf]
mov r9d, r10d
neg r9d
mov r8, r11
and r9d, 0xf
rol r8, 3
not r8
rol r11, 1
mov rdx, r8
mov ecx, r9d
neg ecx
and ecx, 0x3f
shl rdx, cl
mov ecx, r9d
shr r8, cl
or rdx, r8
xor rdx, rax
mov qword [rbp + r10*8 + 0xf], rdx
inc r10
cmp r10, 2
jb 0x18002d720
mov r8, rbx
lea rdx, [rbp + 0xf]
mov ecx, 0x3e8
call fcn.18000a1b0
mov rdx, rsi
mov rcx, rax
mov r15, rax
call fcn.18001c4b0
test rax, rax
jne 0x18002da76
mov ecx, dword [rbp - 0x51]
lea esi, [r13*2]
and ecx, 0x1fffffff
cmp esi, ecx
jbe 0x18002d7b6
sub esi, ecx
xor edx, edx
mov r8d, esi
lea rcx, [rbp - 0x59]
call fcn.1800107b0
jmp 0x18002d8af
je 0x18002d8af
mov qword [rsp + 0xc8], r14
cmp esi, 0x1fffffff
mov r14d, edi
cmovbe r14d, esi
test r14d, r14d
je 0x18002d828
cmp qword [rbp - 0x59], rdi
je 0x18002d831
lea rcx, [rbp - 0x59]
call fcn.18001c540
mov edx, r14d
lea rcx, [rbp - 0x59]
mov ebx, eax
call fcn.18002dcf0
lea rcx, [rbp - 0x59]
call fcn.18001c540
mov r14d, eax
cmp ebx, eax
je 0x18002d87e
mov rbx, qword [rbp - 0x59]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea r9d, [r14 + 8]
mov r8, rbx
mov rcx, rax
mov edx, 8
call qword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov qword [rbp - 0x59], rax
jmp 0x18002d87e
mov rbx, qword [rbp - 0x59]
test rbx, rbx
jne 0x18002d866
mov edx, r14d
lea rcx, [rbp - 0x59]
call fcn.18002dcf0
lea rcx, [rbp - 0x59]
call fcn.18001c540
lea ebx, [rax + 8]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbp - 0x59], rax
jmp 0x18002d87e
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rbp - 0x59], rdi
mov ecx, dword [rbp - 0x51]
mov edx, esi
mov eax, ecx
xor eax, esi
and eax, 0x1fffffff
xor ecx, eax
mov dword [rbp - 0x51], ecx
lea rcx, [rbp - 0x59]
call fcn.18002dcf0
mov rcx, qword [rbp - 0x59]
mov r14, qword [rsp + 0xc8]
test rcx, rcx
je 0x18002d8af
mov byte [rsi + rcx], dil
cmp dword [rbp - 0x51], edi
lea rdx, [rbp - 0x51]
mov rcx, qword [rbp + 0x67]
mov r9b, 1
cmovne rdx, qword [rbp - 0x59]
mov r8d, r13d
call fcn.180007450
cmp dword [rbp - 0x51], edi
lea rdx, [rbp - 0x51]
mov r8, qword [rbp + 0x77]
lea rcx, [rbp - 0x19]
cmovne rdx, qword [rbp - 0x59]
call fcn.18000fb50
mov rdx, rax
mov rcx, r15
call fcn.180010650
mov rax, qword [rbp - 9]
test rax, rax
je 0x18002d90e
sub rax, 4
lea rcx, [rbp - 9]
xor edx, edx
mov qword [rbp - 9], rax
call fcn.18000af20
mov qword [rbp - 9], rdi
mov eax, dword [rbp - 0x11]
cmp eax, 6
jne 0x18002d934
mov rax, qword [rbp + 7]
test rax, rax
je 0x18002d979
sub rax, 4
lea rcx, [rbp + 7]
xor edx, edx
mov qword [rbp + 7], rax
call fcn.18000af20
jmp 0x18002d979
add eax, 0xfffffff9
cmp eax, 1
ja 0x18002d979
mov rdx, qword [rbp + 7]
test rdx, rdx
je 0x18002d979
mov ebx, edi
cmp dword [rbp - 1], ebx
jbe 0x18002d96e
nop dword [rax]
mov eax, ebx
lea rcx, [rax + rax*4]
lea rcx, [rdx + rcx*8]
xor edx, edx
call fcn.180012b50
inc ebx
cmp ebx, dword [rbp - 1]
jae 0x18002d96e
mov rdx, qword [rbp + 7]
jmp 0x18002d950
xor edx, edx
lea rcx, [rbp + 7]
call fcn.18000af20
mov rbx, qword [rbp - 0x59]
test rbx, rbx
jne 0x18002d9b2
xor edx, edx
lea rcx, [rbp - 0x59]
call fcn.18002dcf0
lea rcx, [rbp - 0x59]
call fcn.18001c540
lea ebx, [rax + 8]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x18002d9c6
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rbp - 0x59], rdi
mov dword [rbp - 0x51], edi
test r12b, r12b
jne 0x18002d9f1
cmp byte [reloc.WS2_32.dll_accept], dil
jne 0x18002d9f1
xor r9d, r9d
lea rdx, [rbp - 0x59]
lea rcx, [rbp - 0x49]
lea r8d, [r9 + 1]
call fcn.18000a370
jmp 0x18002da01
mov r8b, 0xc3
lea rdx, [rbp - 0x59]
lea rcx, [rbp - 0x49]
call fcn.180032680
xor r9d, r9d
mov qword [rsp + 0x30], rdi
cmp byte [0x18003a3e1], dil
lea rcx, [0x18003a3e0]
mov dword [rsp + 0x28], 0x8000080
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
lea r8d, [r9 + 3]
jne 0x18002da3a
call qword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x18002da40
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbx, rax
cmp rax, 0xffffffffffffffff
je 0x18002da76
mov r8d, dword [rbp - 0x51]
lea r9, [rbp + 0x7f]
mov rdx, qword [rbp - 0x59]
and r8d, 0x1fffffff
mov rcx, rax
mov dword [rbp + 0x7f], edi
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, qword [rbp - 0x59]
mov r15, qword [rsp + 0xc0]
mov r13, qword [rsp + 0xd0]
mov r12, qword [rsp + 0xd8]
mov rsi, qword [rsp + 0xe0]
test rbx, rbx
jne 0x18002dad3
xor edx, edx
lea rcx, [rbp - 0x59]
call fcn.18002dcf0
lea rcx, [rbp - 0x59]
call fcn.18001c540
lea ebx, [rax + 8]
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
mov edx, 8
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rbp - 0x59], rax
jmp 0x18002daeb
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov qword [rbp - 0x59], rdi
mov rax, qword [rbp - 0x39]
mov rbx, qword [rsp + 0x108]
test rax, rax
je 0x18002db13
sub rax, 4
lea rcx, [rbp - 0x39]
xor edx, edx
mov qword [rbp - 0x39], rax
call fcn.18000af20
mov qword [rbp - 0x39], rdi
mov eax, dword [rbp - 0x41]
cmp eax, 6
jne 0x18002db43
mov rax, qword [rbp - 0x29]
test rax, rax
je 0x18002db89
sub rax, 4
lea rcx, [rbp - 0x29]
xor edx, edx
mov qword [rbp - 0x29], rax
call fcn.18000af20
xor eax, eax
add rsp, 0xe8
pop rdi
pop rbp
ret
add eax, 0xfffffff9
cmp eax, 1
ja 0x18002db89
mov rdx, qword [rbp - 0x29]
test rdx, rdx
je 0x18002db89
cmp dword [rbp - 0x31], edi
jbe 0x18002db7e
nop dword [rax]
mov eax, edi
lea rcx, [rax + rax*4]
lea rcx, [rdx + rcx*8]
xor edx, edx
call fcn.180012b50
inc edi
cmp edi, dword [rbp - 0x31]
jae 0x18002db7e
mov rdx, qword [rbp - 0x29]
jmp 0x18002db60
xor edx, edx
lea rcx, [rbp - 0x29]
call fcn.18000af20
xor eax, eax
add rsp, 0xe8
pop rdi
pop rbp
ret