Function at 0x1400030a4
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x188
lea rbp, [rsp + 0x30]
mov rax, qword [0x1401ff510]
xor rax, rbp
mov qword [rbp + 0x140], rax
mov r15, rcx
mov qword [rbp + 8], rcx
movzx ecx, word [r8]
mov r14, r8
movsxd r13, r9d
mov rdi, rdx
call qword [sym.imp.WS2_32.dll_ntohs]
cmp dword [rdi + 0x6d0], 3
movzx ebx, ax
je 0x1400035c7
mov rcx, qword [r15 + 0xe0]
mov rcx, qword [rcx + 0x290]
call fcn.140133fa0
movzx edx, bx
mov qword [rbp + 0x10], rax
sub edx, 1
je 0x14000343d
sub edx, 1
je 0x14000314c
cmp edx, 2
jne 0x1400035b0
add dword [rdi + 0x6d0], edx
cmp dword [rdi + 0x6d0], 3
jne 0x1400035b0
mov rdx, rdi
mov rcx, r15
call fcn.140002fbc
jmp 0x1400035b0
cmp r13d, 8
jle 0x1400035b0
mov eax, dword [rsp]
sub rsp, 0x20
lea rbx, [rsp + 0x30]
mov eax, dword [rbx]
lea rax, [r14 + 4]
mov qword [rbx], rax
movzx ecx, word [r14 + 2]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
mov r12d, 4
lea rax, [r14 + 4]
mov word [rbx + 8], cx
add rax, rcx
mov qword [rbx + 0xa], rax
movzx eax, r13w
sub ax, cx
sub ax, r12w
mov word [rbx + 0x12], ax
lea eax, [rcx + 4]
cmp r13d, eax
jle 0x1400035b0
and qword [rbp + 0x18], 0
lea esi, [r12 + 0x2c]
mov r8d, ecx
mov dword [rbp], esi
lea rcx, [rbp + 0x18]
mov rdx, rbx
call fcn.14008a3e0
test rax, rax
jne 0x1400031d6
lea rcx, str.Invalid_server_certificate_r_n
jmp 0x14000347b
call fcn.14008b7b0
mov rcx, qword [rbp + 0x18]
lea r14, [0x1402030c0]
mov r8, r14
lea r9, [rbp]
mov rdx, rax
call fcn.14008c8e0
lea r15, [rdi + 0x5dc]
mov r8, rsi
mov rdx, r15
mov rcx, r14
call fcn.14015dad0
test eax, eax
je 0x140003247
call fcn.14008b7a0
mov rcx, qword [rbp + 0x18]
lea r9, [rbp]
mov rdx, rax
mov r8, r14
call fcn.14008c8e0
mov r8d, 0x20
mov rdx, r15
mov rcx, r14
call fcn.14015dad0
test eax, eax
je 0x140003247
lea rcx, str.Server_certificate_mismatch_r_n
jmp 0x14000347b
lea rcx, [rbp + 0x30]
call fcn.140087dd0
mov rcx, qword [rbp + 0x10]
mov rdx, r14
call fcn.140067a18
mov r8, rsi
lea rcx, [rbp + 0x30]
mov rdx, r14
call fcn.140087e60
lea rdx, [rdi + 0x6a0]
mov r8, rsi
lea rcx, [rbp + 0x30]
call fcn.140087e60
lea rdx, [rdi + 0x670]
mov r8, rsi
lea rcx, [rbp + 0x30]
call fcn.140087e60
lea rdx, [rbp + 0x30]
mov rcx, r14
call fcn.140087db0
mov rcx, qword [rbp + 0x18]
call fcn.14008d660
mov rcx, rax
mov r13, rax
call fcn.14008a910
movzx ecx, word [rbx + 0x12]
mov r8d, esi
mov r9, qword [rbx + 0xa]
mov rdx, r14
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ecx
mov ecx, 0x2a1
mov qword [rbp + 0x20], rax
call fcn.14008b010
mov r15d, 1
cmp eax, r15d
jne 0x140003412
lea r14, [rdi + 0x64]
test r14, r14
jne 0x1400032f2
xor ebx, ebx
jmp 0x140003302
mov edx, 0xff
mov rcx, r14
call fcn.1401646ec
mov rbx, rax
add dword [rdi + 0x6d0], r15d
lea rcx, [0x1402040c0]
xor edx, edx
lea r8d, [rdx + 0x48]
call fcn.14015dbb0
mov ecx, 3
call qword [sym.imp.WS2_32.dll_htons]
mov ecx, r15d
mov word [0x1402040c0], ax
call qword [sym.imp.WS2_32.dll_htonl]
mov ecx, r12d
mov dword [0x1402040c2], eax
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [0x1402040c6], eax
mov ecx, dword [rdi + 0x5c]
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [0x1402040ca], eax
mov eax, dword [rdi + 0x570]
cmp eax, 3
je 0x14000336f
test eax, eax
je 0x14000336f
mov r15d, 2
mov ecx, r15d
call qword [sym.imp.WS2_32.dll_htonl]
lea r8, [rdi + 0x574]
mov r9, rsi
lea rcx, [0x1402040d2]
mov dword [0x1402040ce], eax
mov rdx, rsi
call section..text
mov ecx, dword [rdi + 0x60]
call qword [sym.imp.WS2_32.dll_htonl]
movzx ecx, bx
mov dword [0x140204102], eax
call qword [sym.imp.WS2_32.dll_htons]
movsxd r9, ebx
lea rcx, [0x140204108]
mov r8, r14
mov word [0x140204106], ax
mov edx, 0xffb8
call section..text
lea r9d, [rbx + 0x48]
mov edx, 2
mov rbx, qword [rbp + 8]
lea r8, [0x1402040c0]
mov rcx, rbx
call fcn.140071ce0
and dword [rdi + 0x56c], 0
lea rcx, str.Connected._n
call fcn.140001090
cmp dword [rdi + 0x6d0], 3
jne 0x14000341e
mov rdx, rdi
mov rcx, rbx
call fcn.140002fbc
jmp 0x14000341e
lea rcx, str.Invalid_server_signature_r_n
call fcn.140001090
mov rcx, qword [rbp + 0x20]
call fcn.14008cb40
mov rcx, r13
call fcn.14008a7a0
mov rcx, qword [rbp + 0x18]
call fcn.14008a310
jmp 0x1400035b0
cmp r13d, 0x62
jne 0x1400035b0
lea rdx, [0x1402040c0]
mov rcx, rax
call fcn.140067a18
lea r15, [r14 + 2]
lea esi, [r13 - 0x32]
mov rdx, r15
mov r8d, esi
lea rcx, [0x1402040c0]
call fcn.14015dad0
test eax, eax
je 0x140003485
lea rcx, str.Bad_server_certificate_hash_r_n
call fcn.140001090
jmp 0x1400035b0
lea rbx, [rdi + 0x670]
mov r9, rsi
mov rcx, rbx
lea r8, [r14 + 0x32]
mov rdx, rsi
call section..text
mov ecx, 2
call qword [sym.imp.WS2_32.dll_htons]
mov word [0x1402040c0], ax
lea r12, [0x1402040c4]
mov rcx, qword [rdi + 0x610]
lea rdx, [rbp + 0x20]
mov qword [rbp + 0x20], r12
call fcn.14008a4c0
mov ecx, eax
call qword [sym.imp.WS2_32.dll_htons]
lea rcx, [rbp + 0x30]
mov word [0x1402040c2], ax
call fcn.140087dd0
mov rcx, qword [rbp + 0x10]
lea r14, [0x1402030c0]
mov rdx, r14
call fcn.140067a18
mov r8, rsi
lea rcx, [rbp + 0x30]
mov rdx, r15
call fcn.140087e60
mov r8, rsi
lea rcx, [rbp + 0x30]
mov rdx, rbx
call fcn.140087e60
lea rdx, [rdi + 0x6a0]
mov r8, rsi
lea rcx, [rbp + 0x30]
call fcn.140087e60
lea rdx, [rbp + 0x30]
mov rcx, r14
call fcn.140087db0
mov rcx, qword [rdi + 0x618]
call fcn.14008a910
movzx edx, word [0x1402040c2]
mov r10d, 0xfffc
mov qword [rsp + 0x28], rax
sub r10d, edx
mov rdi, rax
mov dword [rbp], r10d
lea rax, [rbp]
mov r8d, esi
lea r9, [r12 + rdx]
mov qword [rsp + 0x20], rax
mov rdx, r14
mov ecx, 0x2a1
call fcn.14008aec0
mov r15d, 1
cmp eax, r15d
jne 0x1400035a8
movzx ecx, word [0x1402040c2]
lea r8, [0x1402040c0]
mov r9d, dword [rbp]
lea edx, [r15 + 1]
add ecx, 4
add r9d, ecx
mov rcx, qword [rbp + 8]
call fcn.140071ce0
mov rcx, rdi
call fcn.14008cb40
mov rcx, qword [rbp + 0x10]
test rcx, rcx
je 0x140003be6
call fcn.14008a310
jmp 0x140003be6
mov eax, 0xa
cmp bx, ax
jb 0x140003be6
cmp byte [r14], 0x7b
je 0x140003a8c
mov eax, 0x3e8
cmp bx, ax
jae 0x140003a8c
mov r12d, 4
cmp r13d, r12d
jl 0x140003be6
movzx ecx, word [r14 + 2]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx edx, bx
movzx esi, ax
mov word [rbp], ax
sub edx, 0xa
je 0x140003850
sub edx, 1
je 0x1400037ae
sub edx, 1
je 0x140003757
sub edx, 1
je 0x1400036d6
cmp edx, 1
jne 0x140003be6
mov rcx, qword [rdi + 0x30]
lea rdx, str..update.exe
call fcn.140002508
mov rdi, rax
lea r15d, [r12 - 3]
and qword [rbp + 0x10], 0
lea r8, [0x1401e2f1c]
mov rdx, rdi
lea rcx, [rbp + 0x10]
call fcn.1401638e0
mov r9, qword [rbp + 0x10]
test r9, r9
je 0x14000369b
lea eax, [r13 - 4]
mov r8, r15
movsxd rdx, eax
lea rcx, [r14 + 4]
call fcn.140163560
mov rcx, qword [rbp + 0x10]
mov rbx, rax
call fcn.14015f470
test rbx, rbx
jne 0x1400036a8
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140003656
mov ecx, reloc.WS2_32.dll_ntohl
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, si
mov word [0x1402040c0], ax
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [rbp + 8]
mov r9d, r12d
mov word [0x1402040c2], ax
jmp 0x140003991
mov rcx, qword [rdi + 0x30]
lea rdx, str..update.exe
call fcn.140002508
mov rbx, rax
cmp r13d, r12d
je 0x140003741
cmp r13d, 0x34
jne 0x140003be6
lea rdx, [rbp + 0x110]
mov rcx, rax
call fcn.140002c14
test eax, eax
jne 0x140003741
lea rdx, [r14 + 4]
lea r8d, [r13 - 4]
lea rcx, [rbp + 0x110]
call fcn.14015dad0
test eax, eax
jne 0x140003741
mov rcx, qword [rdi]
lea r15d, [r13 - 0x33]
mov dword [rdi + 0x5a4], r15d
mov dword [rcx], 2
call fcn.140069148
jmp 0x140003be6
test rbx, rbx
je 0x140003be6
mov rcx, rbx
call fcn.14016b580
jmp 0x140003be6
cmp dword [rdi + 0x5a8], 0
jne 0x140003be6
mov ecx, ntohl
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, si
mov word [0x1402040c0], ax
call qword [sym.imp.WS2_32.dll_htons]
mov esi, 0x30
lea r8, [rdi + 0x5ac]
mov edx, esi
lea rcx, [0x1402040c4]
mov r9, rsi
mov word [0x1402040c2], ax
call section..text
mov r9d, gethostname
jmp 0x14000398e
lea rbx, str.CoreModule
mov edx, 0x400
mov rcx, rbx
call fcn.1401646ec
mov rcx, qword [rdi + 0x40]
mov r9d, eax
and dword [rsp + 0x20], 0
mov r8, rbx
xor edx, edx
mov rcx, qword [rcx + 0x1010]
call fcn.14006d334
test rax, rax
je 0x1400037ea
mov rcx, qword [rax + 0x28]
jmp 0x1400037ec
xor ecx, ecx
lea rax, [rcx + 4]
neg rcx
sbb rbx, rbx
and rbx, rax
cmp dword [rdi + 0x58], 0
jne 0x140003be6
mov ecx, ntohl
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, si
mov word [0x1402040c0], ax
call qword [sym.imp.WS2_32.dll_htons]
mov word [0x1402040c2], ax
test rbx, rbx
je 0x14000398b
mov esi, 0x30
lea rcx, [0x1402040c4]
mov r9d, esi
mov edx, esi
mov r8, rbx
call section..text
lea r12d, [rsi + 4]
jmp 0x14000398b
cmp dword [rdi + 0x58], 0
jne 0x140003be6
cmp r13, 0x34
jbe 0x140003a45
lea rbx, str.CoreModule
mov edx, 0x400
mov rcx, rbx
call fcn.1401646ec
mov rcx, qword [rdi + 0x40]
mov r9d, eax
and dword [rsp + 0x20], 0
mov r8, rbx
xor edx, edx
mov rcx, qword [rcx + 0x1010]
call fcn.14006d334
test rax, rax
je 0x1400038a0
mov rcx, qword [rax + 0x28]
jmp 0x1400038a2
xor ecx, ecx
lea rax, [rcx + 4]
mov esi, 0x30
neg rcx
sbb rcx, rcx
and rcx, rax
mov qword [rbp + 8], rcx
je 0x1400038ce
lea rdx, [r14 + 4]
mov r8d, esi
call fcn.14015dad0
test eax, eax
je 0x140003a14
mov rcx, qword [rdi + 0x40]
lea eax, [r13 - 0x34]
lea r9, [r14 + 0x34]
mov dword [rsp + 0x20], eax
mov r8d, 0xa
mov rdx, rbx
call fcn.1400706e4
mov edx, 0x400
mov rcx, rbx
call fcn.1401646ec
mov rcx, qword [rdi + 0x40]
mov r9d, eax
and dword [rsp + 0x20], 0
mov r8, rbx
xor edx, edx
mov rcx, qword [rcx + 0x1010]
call fcn.14006d334
test rax, rax
je 0x140003921
mov rcx, qword [rax + 0x28]
jmp 0x140003923
xor ecx, ecx
lea rax, [rcx + 4]
mov r8, rsi
neg rcx
lea rdx, [r14 + 4]
sbb rcx, rcx
and rcx, rax
mov qword [rbp + 8], rcx
call fcn.14015dad0
test eax, eax
je 0x1400039a7
mov edx, 0x400
mov rcx, rbx
call fcn.1401646ec
mov rcx, qword [rdi + 0x40]
mov r8d, eax
mov rdx, rbx
call fcn.140070904
mov rcx, rdi
call fcn.140002b0c
mov ecx, ntohl
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [rbp]
mov word [0x1402040c0], ax
call qword [sym.imp.WS2_32.dll_htons]
mov word [0x1402040c2], ax
mov r9d, r12d
mov rcx, r15
mov edx, 2
lea r8, [0x1402040c0]
call fcn.140071ce0
jmp 0x140003be6
mov rcx, rdi
call fcn.140002b0c
mov r12, rax
test rax, rax
je 0x140003a0b
lea r8d, [r13 - 0x38]
xor r9d, r9d
lea rdx, [r14 + 0x38]
mov rcx, rax
call fcn.14005e018
test eax, eax
jne 0x1400039da
mov rcx, r12
call fcn.14005e0c8
test eax, eax
je 0x140003a0b
xor r8d, r8d
or edx, 0xffffffff
mov rcx, r12
call fcn.14000d564
mov r9, rax
lea r8, [0x1401d58ec]
mov edx, 0x1000
lea rcx, [0x1402030c0]
call fcn.1400010e4
mov rcx, r12
call fcn.14000ef10
mov rcx, qword [rdi + 0x40]
call fcn.140070ac0
mov ecx, ntohl
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [rbp]
mov word [0x1402040c0], ax
call qword [sym.imp.WS2_32.dll_htons]
mov r8, qword [rbp + 8]
lea rcx, [0x1402040c4]
mov edx, 0xfffc
jmp 0x140003794
cmp r13d, r12d
jne 0x140003be6
lea rbx, str.CoreModule
mov edx, 0x400
mov rcx, rbx
call fcn.1401646ec
mov rcx, qword [rdi + 0x40]
mov r8d, eax
mov rdx, rbx
call fcn.140070904
mov rcx, rdi
call fcn.140002b0c
mov ecx, ntohl
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, si
jmp 0x140003977
mov rdx, qword [rdi]
mov rcx, qword [rdi + 0x10]
call fcn.140001e88
mov rcx, qword [rdi + 0x10]
lea r8, str.emit
or ebx, 0xffffffff
mov edx, ebx
call fcn.14000b7ec
mov rcx, qword [rdi + 0x10]
lea edx, [rbx - 1]
mov r8d, ebx
call fcn.14000c71c
mov rcx, qword [rdi + 0x10]
lea rdx, str.Command
call fcn.14000e1cc
cmp byte [r14], 0x7b
mov rcx, qword [rdi + 0x10]
jne 0x140003b71
call fcn.14000e314
mov rcx, qword [rdi + 0x10]
lea r8, str.JSON
mov edx, ebx
call fcn.14000b7ec
mov rcx, qword [rdi + 0x10]
lea r8, str.parse
mov edx, ebx
call fcn.14000b7ec
mov rcx, qword [rdi + 0x10]
lea edx, [rbx - 2]
mov r8d, ebx
call fcn.14000c71c
mov rcx, qword [rdi + 0x10]
call fcn.14000efac
mov rcx, qword [rdi + 0x10]
mov r8, r13
mov rdx, r14
call fcn.14000e118
mov rcx, qword [rdi + 0x10]
lea r15d, [rbx + 2]
and dword [rbp + 0xc], 0
lea r9d, [rbx + 3]
lea r8, [rbp + 8]
mov dword [rbp + 8], r15d
lea rdx, [0x14000a9fc]
mov dword [rsp + 0x20], r15d
call fcn.14000aac8
test eax, eax
je 0x140003bb8
mov rcx, qword [rdi + 0x10]
call fcn.14000ef10
mov rcx, qword [rdi + 0x10]
mov r8, r13
mov rdx, r14
call fcn.14000e118
jmp 0x140003bb8
xor edx, edx
lea r8d, [rdx + 3]
call fcn.14000ebf8
mov rcx, qword [rdi + 0x10]
mov esi, 0xfffffffc
mov edx, esi
call fcn.14000c834
mov rcx, qword [rdi + 0x10]
mov r9, r13
mov r8, r14
mov edx, esi
call fcn.14000a914
mov rcx, qword [rdi + 0x10]
lea r15d, [rsi + 5]
mov r9, r13
mov dword [rsp + 0x20], r15d
mov edx, esi
call fcn.14000e964
lea r15d, [rsi + 6]
mov rcx, qword [rdi + 0x10]
mov edx, 2
call fcn.14000aa7c
test eax, eax
je 0x140003bda
mov rcx, qword [rdi + 0x10]
lea rdx, [0x1401d5438]
call fcn.140046018
mov rcx, qword [rdi + 0x10]
mov edx, r15d
call fcn.14000edf0
mov rcx, qword [rbp + 0x140]
xor rcx, rbp
call fcn.14015c600
lea rsp, [rbp + 0x158]
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret