Function at 0x140104c00
Capabilities:
Reference http user-agent string

Disassembly:
push rbx
push rbp
push rdi
sub rsp, 0x30
mov rax, qword gs:[0x58]
mov rbp, rcx
mov ecx, 4
mov dword [rsp + 0x58], 0
mov byte [rsp + 0x50], 0
mov rax, qword [rax]
mov eax, dword [rcx + rax]
cmp dword [0x1403f3e58], eax
jg 0x140104f4c
mov rbx, qword [0x1403efd48]
lea rdi, [0x1403efd38]
test rbx, rbx
jne 0x140104f21
mov rax, qword [0x1403f38d8]
test rax, rax
jne 0x140104ca3
mov rax, qword [0x1403f38c8]
test rax, rax
jne 0x140104c87
lea rcx, str.urlmon.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [0x1403f38c8], rax
test rax, rax
je 0x140104cbb
mov rbx, qword [0x1403efd48]
lea rdx, str.ObtainUserAgentString
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1403f38d8], rax
test rax, rax
je 0x140104cbb
lea r8, [rsp + 0x58]
mov ecx, listen
lea rdx, [rsp + 0x50]
call rax
cmp eax, 0x8007000e
je 0x140104d26
mov r8, qword [reloc.WS2_32.dll_ntohs]
mov r10, rdi
mov r9, qword [0x1403efd38]
cmp r8, 0x10
mov rbx, qword [0x1403efd48]
mov rcx, rdi
cmovae r10, r9
mov rax, rdi
add r10, rbx
cmp r8, 0x10
cmovae rcx, r9
cmovae rax, r9
sub r10, rcx
mov rdx, rcx
sub rdx, rax
mov rcx, rdi
mov rax, rbx
sub rax, rdx
cmp rax, r10
cmovb r10, rax
cmp r8, 0x10
cmovae rcx, r9
sub rbx, r10
add rcx, rdx
mov r8, rbx
sub r8, rdx
lea rdx, [rcx + r10]
jmp 0x140104ef3
mov ecx, dword [rsp + 0x58]
mov rdx, qword [0x1403efd48]
add ecx, 8
cmp rcx, rdx
ja 0x140104d59
cmp qword [reloc.WS2_32.dll_ntohs], 0x10
mov rax, rdi
mov qword [0x1403efd48], rcx
cmovae rax, qword [0x1403efd38]
mov byte [rax + rcx], 0
jmp 0x140104dbd
mov r8, qword [reloc.WS2_32.dll_ntohs]
mov qword [rsp + 0x60], rsi
mov rax, r8
mov rsi, rcx
sub rax, rdx
sub rsi, rdx
cmp rsi, rax
ja 0x140104da2
cmp r8, 0x10
mov qword [0x1403efd48], rcx
mov rbx, rdi
mov r8, rsi
cmovae rbx, qword [0x1403efd38]
add rbx, rdx
xor edx, edx
mov rcx, rbx
call fcn.1402a1a30
mov byte [rsi + rbx], 0
jmp 0x140104db8
mov r9, rsi
mov byte [rsp + 0x20], 0
xor r8d, r8d
mov rdx, rsi
mov rcx, rdi
call fcn.14010aac0
mov rsi, qword [rsp + 0x60]
mov r10, qword [reloc.WS2_32.dll_ntohs]
mov rbx, rdi
mov r8, qword [0x1403efd38]
cmp r10, 0x10
mov rax, qword [0x1403f38d8]
cmovae rbx, r8
test rax, rax
jne 0x140104e35
mov rax, qword [0x1403f38c8]
test rax, rax
jne 0x140104e19
lea rcx, str.urlmon.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov qword [0x1403f38c8], rax
test rax, rax
je 0x140104e8d
mov r10, qword [reloc.WS2_32.dll_ntohs]
mov r8, qword [0x1403efd38]
lea rdx, str.ObtainUserAgentString
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1403f38d8], rax
test rax, rax
je 0x140104e8d
lea r8, [rsp + 0x58]
mov rdx, rbx
mov ecx, listen
call rax
test eax, eax
jne 0x140104e8d
cmp dword [rsp + 0x58], eax
je 0x140104e8d
cmp qword [reloc.WS2_32.dll_ntohs], 0x10
mov rax, rdi
mov rdx, 0xffffffffffffffff
cmovae rax, qword [0x1403efd38]
nop dword [rax + rax]
inc rdx
cmp byte [rax + rdx], 0
jne 0x140104e70
xor r8d, r8d
mov rcx, rdi
call fcn.140108440
mov rbx, qword [0x1403efd48]
jmp 0x140104f02
mov r8, qword [0x1403efd38]
mov r9, rdi
mov r10, qword [reloc.WS2_32.dll_ntohs]
mov rcx, rdi
mov rbx, qword [0x1403efd48]
cmp r10, 0x10
mov rax, rdi
cmovae r9, r8
add r9, rbx
cmp r10, 0x10
cmovae rcx, r8
cmovae rax, r8
sub r9, rcx
mov rdx, rcx
sub rdx, rax
mov rcx, rdi
mov rax, rbx
sub rax, rdx
cmp rax, r9
cmovb r9, rax
cmp r10, 0x10
cmovae rcx, r8
sub rbx, r9
add rcx, rdx
mov r8, rbx
sub r8, rdx
lea rdx, [rcx + r9]
inc r8
call fcn.1402a1390
mov qword [0x1403efd48], rbx
test rbx, rbx
jne 0x140104f21
lea r8d, [rbx + 0x3e]
mov rcx, rdi
lea rdx, str.Mozilla_5.0__Windows_NT_10.0__Trident_7.0__rv:11.0__like_Gecko
call fcn.14001aef0
mov rbx, qword [0x1403efd48]
cmp rbp, rdi
je 0x140104f44
cmp qword [reloc.WS2_32.dll_ntohs], 0x10
mov r8, rbx
mov rcx, rbp
cmovae rdi, qword [0x1403efd38]
mov rdx, rdi
call fcn.14001aef0
add rsp, 0x30
pop rdi
pop rbp
pop rbx
ret
lea rcx, [0x1403f3e58]
call fcn.14022d36c
cmp dword [0x1403f3e58], 0xffffffff
jne 0x140104c38
lea rcx, [0x14030c910]
call fcn.14022d85c
lea rcx, [0x1403f3e58]
call fcn.14022d300
jmp 0x140104c38