Function at 0x140003064
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 0x140003587
mov rcx, qword [r15 + 0xe0]
mov rcx, qword [rcx + 0x290]
call fcn.1401337b0
movzx edx, bx
mov qword [rbp + 0x10], rax
sub edx, 1
je 0x1400033fd
sub edx, 1
je 0x14000310c
cmp edx, 2
jne 0x140003570
add dword [rdi + 0x6d0], edx
cmp dword [rdi + 0x6d0], 3
jne 0x140003570
mov rdx, rdi
mov rcx, r15
call fcn.140002f7c
jmp 0x140003570
cmp r13d, 8
jle 0x140003570
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 0x140003570
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.140089bc0
test rax, rax
jne 0x140003196
lea rcx, str.Invalid_server_certificate_r_n
jmp 0x14000343b
call fcn.14008afb0
mov rcx, qword [rbp + 0x18]
lea r14, [0x140203120]
mov r8, r14
lea r9, [rbp]
mov rdx, rax
call fcn.14008c0e0
lea r15, [rdi + 0x5dc]
mov r8, rsi
mov rdx, r15
mov rcx, r14
call fcn.14015d330
test eax, eax
je 0x140003207
call fcn.14008afa0
mov rcx, qword [rbp + 0x18]
lea r9, [rbp]
mov rdx, rax
mov r8, r14
call fcn.14008c0e0
mov r8d, 0x20
mov rdx, r15
mov rcx, r14
call fcn.14015d330
test eax, eax
je 0x140003207
lea rcx, str.Server_certificate_mismatch_r_n
jmp 0x14000343b
lea rcx, [rbp + 0x30]
call fcn.1400875b0
mov rcx, qword [rbp + 0x10]
mov rdx, r14
call fcn.140066938
mov r8, rsi
lea rcx, [rbp + 0x30]
mov rdx, r14
call fcn.140087640
lea rdx, [rdi + 0x6a0]
mov r8, rsi
lea rcx, [rbp + 0x30]
call fcn.140087640
lea rdx, [rdi + 0x670]
mov r8, rsi
lea rcx, [rbp + 0x30]
call fcn.140087640
lea rdx, [rbp + 0x30]
mov rcx, r14
call fcn.140087590
mov rcx, qword [rbp + 0x18]
call fcn.14008ce60
mov rcx, rax
mov r13, rax
call fcn.14008a100
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.14008a810
mov r15d, 1
cmp eax, r15d
jne 0x1400033d2
lea r14, [rdi + 0x64]
test r14, r14
jne 0x1400032b2
xor ebx, ebx
jmp 0x1400032c2
mov edx, 0xff
mov rcx, r14
call fcn.140163e74
mov rbx, rax
add dword [rdi + 0x6d0], r15d
lea rcx, [0x140204120]
xor edx, edx
lea r8d, [rdx + 0x48]
call fcn.14015d410
mov ecx, 3
call qword [sym.imp.WS2_32.dll_htons]
mov ecx, r15d
mov word [0x140204120], ax
call qword [sym.imp.WS2_32.dll_htonl]
mov ecx, r12d
mov dword [0x140204122], eax
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [0x140204126], eax
mov ecx, dword [rdi + 0x5c]
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [0x14020412a], eax
mov eax, dword [rdi + 0x570]
cmp eax, 3
je 0x14000332f
test eax, eax
je 0x14000332f
mov r15d, 2
mov ecx, r15d
call qword [sym.imp.WS2_32.dll_htonl]
lea r8, [rdi + 0x574]
mov r9, rsi
lea rcx, [0x140204132]
mov dword [0x14020412e], 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 [0x140204162], eax
call qword [sym.imp.WS2_32.dll_htons]
movsxd r9, ebx
lea rcx, [0x140204168]
mov r8, r14
mov word [0x140204166], ax
mov edx, 0xffb8
call section..text
lea r9d, [rbx + 0x48]
mov edx, 2
mov rbx, qword [rbp + 8]
lea r8, [0x140204120]
mov rcx, rbx
call fcn.140071590
and dword [rdi + 0x56c], 0
lea rcx, str.Connected._n
call fcn.140001090
cmp dword [rdi + 0x6d0], 3
jne 0x1400033de
mov rdx, rdi
mov rcx, rbx
call fcn.140002f7c
jmp 0x1400033de
lea rcx, str.Invalid_server_signature_r_n
call fcn.140001090
mov rcx, qword [rbp + 0x20]
call fcn.14008c340
mov rcx, r13
call fcn.140089f80
mov rcx, qword [rbp + 0x18]
call fcn.140089af0
jmp 0x140003570
cmp r13d, 0x62
jne 0x140003570
lea rdx, [0x140204120]
mov rcx, rax
call fcn.140066938
lea r15, [r14 + 2]
lea esi, [r13 - 0x32]
mov rdx, r15
mov r8d, esi
lea rcx, [0x140204120]
call fcn.14015d330
test eax, eax
je 0x140003445
lea rcx, str.Bad_server_certificate_hash_r_n
call fcn.140001090
jmp 0x140003570
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 [0x140204120], ax
lea r12, [0x140204124]
mov rcx, qword [rdi + 0x610]
lea rdx, [rbp + 0x20]
mov qword [rbp + 0x20], r12
call fcn.140089ca0
mov ecx, eax
call qword [sym.imp.WS2_32.dll_htons]
lea rcx, [rbp + 0x30]
mov word [0x140204122], ax
call fcn.1400875b0
mov rcx, qword [rbp + 0x10]
lea r14, [0x140203120]
mov rdx, r14
call fcn.140066938
mov r8, rsi
lea rcx, [rbp + 0x30]
mov rdx, r15
call fcn.140087640
mov r8, rsi
lea rcx, [rbp + 0x30]
mov rdx, rbx
call fcn.140087640
lea rdx, [rdi + 0x6a0]
mov r8, rsi
lea rcx, [rbp + 0x30]
call fcn.140087640
lea rdx, [rbp + 0x30]
mov rcx, r14
call fcn.140087590
mov rcx, qword [rdi + 0x618]
call fcn.14008a100
movzx edx, word [0x140204122]
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.14008a6c0
mov r15d, 1
cmp eax, r15d
jne 0x140003568
movzx ecx, word [0x140204122]
lea r8, [0x140204120]
mov r9d, dword [rbp]
lea edx, [r15 + 1]
add ecx, 4
add r9d, ecx
mov rcx, qword [rbp + 8]
call fcn.140071590
mov rcx, rdi
call fcn.14008c340
mov rcx, qword [rbp + 0x10]
test rcx, rcx
je 0x140003ba3
call fcn.140089af0
jmp 0x140003ba3
mov eax, 0xa
cmp bx, ax
jb 0x140003ba3
cmp byte [r14], 0x7b
je 0x140003a49
mov eax, 0x3e8
cmp bx, ax
jae 0x140003a49
mov r12d, 4
cmp r13d, r12d
jl 0x140003ba3
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 0x140003810
sub edx, 1
je 0x14000376e
sub edx, 1
je 0x140003717
sub edx, 1
je 0x140003696
cmp edx, 1
jne 0x140003ba3
mov rcx, qword [rdi + 0x30]
lea rdx, str..update.exe
call fcn.1400024ec
mov rdi, rax
lea r15d, [r12 - 3]
and qword [rbp + 0x10], 0
lea r8, [0x1401e2d9c]
mov rdx, rdi
lea rcx, [rbp + 0x10]
call fcn.140163068
mov r9, qword [rbp + 0x10]
test r9, r9
je 0x14000365b
lea eax, [r13 - 4]
mov r8, r15
movsxd rdx, eax
lea rcx, [r14 + 4]
call fcn.140162d40
mov rcx, qword [rbp + 0x10]
mov rbx, rax
call fcn.14015ec50
test rbx, rbx
jne 0x140003668
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140003616
mov ecx, reloc.WS2_32.dll_ntohl
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, si
mov word [0x140204120], ax
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [rbp + 8]
mov r9d, r12d
mov word [0x140204122], ax
jmp 0x140003951
mov rcx, qword [rdi + 0x30]
lea rdx, str..update.exe
call fcn.1400024ec
mov rbx, rax
cmp r13d, r12d
je 0x140003701
cmp r13d, 0x34
jne 0x140003ba3
lea rdx, [rbp + 0x110]
mov rcx, rax
call fcn.140002bd4
test eax, eax
jne 0x140003701
lea rdx, [r14 + 4]
lea r8d, [r13 - 4]
lea rcx, [rbp + 0x110]
call fcn.14015d330
test eax, eax
jne 0x140003701
mov rcx, qword [rdi]
lea r15d, [r13 - 0x33]
mov dword [rdi + 0x5a4], r15d
mov dword [rcx], 2
call fcn.140068b3c
jmp 0x140003ba3
test rbx, rbx
je 0x140003ba3
mov rcx, rbx
call fcn.14016a75c
jmp 0x140003ba3
cmp dword [rdi + 0x5a8], 0
jne 0x140003ba3
mov ecx, reloc.WS2_32.dll_inet_ntoa
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, si
mov word [0x140204120], ax
call qword [sym.imp.WS2_32.dll_htons]
mov esi, gethostbyname
lea r8, [rdi + 0x5ac]
mov edx, esi
lea rcx, [0x140204124]
mov r9, rsi
mov word [0x140204122], ax
call section..text
mov r9d, reloc.WS2_32.dll_gethostbyname
jmp 0x14000394e
lea rbx, str.CoreModule
mov edx, 0x400
mov rcx, rbx
call fcn.140163e74
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.14006ccc4
test rax, rax
je 0x1400037aa
mov rcx, qword [rax + 0x28]
jmp 0x1400037ac
xor ecx, ecx
lea rax, [rcx + 4]
neg rcx
sbb rbx, rbx
and rbx, rax
cmp dword [rdi + 0x58], 0
jne 0x140003ba3
mov ecx, reloc.WS2_32.dll_inet_addr
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, si
mov word [0x140204120], ax
call qword [sym.imp.WS2_32.dll_htons]
mov word [0x140204122], ax
test rbx, rbx
je 0x14000394b
mov esi, gethostbyname
lea rcx, [0x140204124]
mov r9d, esi
mov edx, esi
mov r8, rbx
call section..text
lea r12d, [rsi + 4]
jmp 0x14000394b
cmp dword [rdi + 0x58], 0
jne 0x140003ba3
cmp r13, 0x34
jbe 0x140003a02
lea rbx, str.CoreModule
mov edx, 0x400
mov rcx, rbx
call fcn.140163e74
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.14006ccc4
test rax, rax
je 0x140003860
mov rcx, qword [rax + 0x28]
jmp 0x140003862
xor ecx, ecx
lea rax, [rcx + 4]
mov esi, gethostbyname
neg rcx
sbb rcx, rcx
and rcx, rax
mov qword [rbp + 8], rcx
je 0x14000388e
lea rdx, [r14 + 4]
mov r8d, esi
call fcn.14015d330
test eax, eax
je 0x1400039d1
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.14006ff94
mov edx, 0x400
mov rcx, rbx
call fcn.140163e74
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.14006ccc4
test rax, rax
je 0x1400038e1
mov rcx, qword [rax + 0x28]
jmp 0x1400038e3
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.14015d330
test eax, eax
je 0x140003967
mov edx, 0x400
mov rcx, rbx
call fcn.140163e74
mov rcx, qword [rdi + 0x40]
mov r8d, eax
mov rdx, rbx
call fcn.1400701b4
mov rcx, rdi
call fcn.140002ad0
mov ecx, reloc.WS2_32.dll_inet_addr
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [rbp]
mov word [0x140204120], ax
call qword [sym.imp.WS2_32.dll_htons]
mov word [0x140204122], ax
mov r9d, r12d
mov rcx, r15
mov edx, 2
lea r8, [0x140204120]
call fcn.140071590
jmp 0x140003ba3
mov rcx, rdi
call fcn.140002ad0
mov r12, rax
test rax, rax
je 0x1400039c8
lea r8d, [r13 - 0x38]
mov rcx, rax
lea rdx, [r14 + 0x38]
call fcn.14005d034
test eax, eax
jne 0x140003997
mov rcx, r12
call fcn.14005d074
test eax, eax
je 0x1400039c8
xor r8d, r8d
or edx, 0xffffffff
mov rcx, r12
call fcn.14000d4e8
mov r9, rax
lea r8, [0x1401d590c]
mov edx, 0x1000
lea rcx, [0x140203120]
call fcn.1400010e4
mov rcx, r12
call fcn.14000ee94
mov rcx, qword [rdi + 0x40]
call fcn.140070370
mov ecx, reloc.WS2_32.dll_inet_addr
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, word [rbp]
mov word [0x140204120], ax
call qword [sym.imp.WS2_32.dll_htons]
mov r8, qword [rbp + 8]
lea rcx, [0x140204124]
mov edx, 0xfffc
jmp 0x140003754
cmp r13d, r12d
jne 0x140003ba3
lea rbx, str.CoreModule
mov edx, 0x400
mov rcx, rbx
call fcn.140163e74
mov rcx, qword [rdi + 0x40]
mov r8d, eax
mov rdx, rbx
call fcn.1400701b4
mov rcx, rdi
call fcn.140002ad0
mov ecx, reloc.WS2_32.dll_inet_addr
call qword [sym.imp.WS2_32.dll_htons]
movzx ecx, si
jmp 0x140003937
mov rdx, qword [rdi]
mov rcx, qword [rdi + 0x10]
call fcn.140001e6c
mov rcx, qword [rdi + 0x10]
lea r8, str.emit
or ebx, 0xffffffff
mov edx, ebx
call fcn.14000b770
mov rcx, qword [rdi + 0x10]
lea edx, [rbx - 1]
mov r8d, ebx
call fcn.14000c6a0
mov rcx, qword [rdi + 0x10]
lea rdx, str.Command
call fcn.14000e150
cmp byte [r14], 0x7b
mov rcx, qword [rdi + 0x10]
jne 0x140003b2e
call fcn.14000e298
mov rcx, qword [rdi + 0x10]
lea r8, str.JSON
mov edx, ebx
call fcn.14000b770
mov rcx, qword [rdi + 0x10]
lea r8, str.parse
mov edx, ebx
call fcn.14000b770
mov rcx, qword [rdi + 0x10]
lea edx, [rbx - 2]
mov r8d, ebx
call fcn.14000c6a0
mov rcx, qword [rdi + 0x10]
call fcn.14000ef30
mov rcx, qword [rdi + 0x10]
mov r8, r13
mov rdx, r14
call fcn.14000e09c
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, [0x14000a980]
mov dword [rsp + 0x20], r15d
call fcn.14000aa4c
test eax, eax
je 0x140003b75
mov rcx, qword [rdi + 0x10]
call fcn.14000ee94
mov rcx, qword [rdi + 0x10]
mov r8, r13
mov rdx, r14
call fcn.14000e09c
jmp 0x140003b75
xor edx, edx
lea r8d, [rdx + 3]
call fcn.14000eb7c
mov rcx, qword [rdi + 0x10]
mov esi, 0xfffffffc
mov edx, esi
call fcn.14000c7b8
mov rcx, qword [rdi + 0x10]
mov r9, r13
mov r8, r14
mov edx, esi
call fcn.14000a898
mov rcx, qword [rdi + 0x10]
lea r15d, [rsi + 5]
mov r9, r13
mov dword [rsp + 0x20], r15d
mov edx, esi
call fcn.14000e8e8
lea r15d, [rsi + 6]
mov rcx, qword [rdi + 0x10]
mov edx, 2
call fcn.14000aa00
test eax, eax
je 0x140003b97
mov rcx, qword [rdi + 0x10]
lea rdx, [0x1401d5458]
call fcn.140045514
mov rcx, qword [rdi + 0x10]
mov edx, r15d
call fcn.14000ed74
mov rcx, qword [rbp + 0x140]
xor rcx, rbp
call fcn.14015bde0
lea rsp, [rbp + 0x158]
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret