Function at 0x180007840
Capabilities:
Check os version
Create process on windows
Get common file path
Print debug messages

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0xe70
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x28], 0xfffffffffffffffe
mov qword [rbp + 0xe60], rbx
mov rax, qword [0x1800ad0e0]
xor rax, rbp
mov qword [rbp + 0xe20], rax
mov rdi, r8
mov rbx, rdx
mov r14d, 0x80004001
call fcn.180036bc0
test al, al
je 0x18000849d
xor r15d, r15d
mov qword [rbp + 0x140], r15
mov rax, qword [rbx]
lea r9, [rbp + 0x140]
xor r8d, r8d
mov rdx, rdi
mov rcx, rbx
call qword [rax + LoadRegTypeLib]
test eax, eax
jne 0x18000849d
xor edx, edx
mov r8d, VarUI4FromDisp
lea rcx, [rbp + 0x2f0]
call fcn.18004c910
mov dword [rbp + 0x2f0], VarUI4FromDisp
lea rcx, [rbp + 0x2f0]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [rbp + 0x2f4], 6
jb 0x180007b5d
lea rcx, str.sgephook.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
jne 0x180007926
lea rcx, str.sgephook_signed.dll
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
jne 0x180007926
lea rcx, str.not_insert_load_url
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x180007b4b
mov r8, qword [rbp + 0x140]
or rdi, 0xffffffffffffffff
test r8, r8
je 0x1800079b5
mov rcx, rdi
nop dword [rax]
inc rcx
cmp word [r8 + rcx*2], r15w
jne 0x180007940
inc ecx
cmp ecx, 0x3fffffff
jg 0x1800079b5
movsxd rax, ecx
add rax, rax
lea rsi, [rax + 0xf]
cmp rsi, rax
ja 0x18000796d
movabs rsi, 0xffffffffffffff0
and rsi, 0xfffffffffffffff0
mov rax, rsi
call fcn.180047280
sub rsp, rsi
lea rbx, [rsp + 0x40]
test rbx, rbx
je 0x1800079b5
mov byte [rbx], r15b
lea eax, [rcx + rcx]
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
mov r9d, edi
xor edx, edx
lea ecx, [rdx + 3]
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
cmove rbx, r15
jmp 0x1800079b8
mov rbx, r15
mov qword [rbp + 0x168], setsockopt
mov qword [rbp + 0x160], r15
mov byte [rbp + 0x150], r15b
cmp byte [rbx], r15b
jne 0x1800079db
mov r8, r15
jmp 0x1800079e9
mov r8, rdi
nop
inc r8
cmp byte [rbx + r8], r15b
jne 0x1800079e0
mov rdx, rbx
lea rcx, [rbp + 0x150]
call fcn.1800024c0
nop
lea rax, [rbp + 0x1b8]
mov qword [rbp + 0x148], rax
mov rcx, qword [rbp + 0x160]
test rcx, rcx
je 0x180007a8c
lea rax, [rbp + 0x150]
cmp qword [rbp + 0x168], 0x10
cmovae rax, qword [rbp + 0x150]
lea rbx, [rcx - 1]
add rbx, rax
nop dword [rax]
nop word [rax + rax]
movsx edx, byte [rbx]
mov r8d, 1
lea rcx, [0x18007c2e8]
call fcn.18004ed1c
test rax, rax
jne 0x180007a70
lea rcx, [rbp + 0x150]
call fcn.180036bb0
cmp rbx, rax
je 0x180007a8c
dec rbx
jmp 0x180007a40
lea rax, [rbp + 0x150]
cmp qword [rbp + 0x168], 0x10
cmovae rax, qword [rbp + 0x150]
sub rbx, rax
jmp 0x180007a8f
mov rbx, rdi
lea r8, [rbx + 1]
mov r9, rdi
lea rdx, [rbp + 0x1b8]
lea rcx, [rbp + 0x150]
call fcn.18001da50
mov rbx, rax
mov qword [rbp + 0x188], setsockopt
mov qword [rbp + 0x180], r15
mov byte [rbp + 0x170], 0
mov r9, rdi
xor r8d, r8d
lea rdx, [rbp + 0x150]
lea rcx, [rbp + 0x170]
call fcn.180002390
nop
mov rdx, rbx
lea rcx, [rbp + 0x170]
call fcn.180044aa0
nop
mov rax, qword [rbp + 0x168]
cmp rax, 0x10
jb 0x180007b4b
inc rax
mov rcx, qword [rbp + 0x150]
cmp rax, 0x1000
jb 0x180007b46
test cl, 0x1f
je 0x180007b19
call fcn.180057aec
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x180007b28
call fcn.180057aec
int3
sub rcx, rax
cmp rcx, 8
jae 0x180007b37
call fcn.180057aec
int3
cmp rcx, 0x27
jbe 0x180007b43
call fcn.180057aec
int3
mov rcx, rax
call fcn.180046964
mov rcx, qword [rbp + 0x140]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
jmp 0x18000849d
mov r8, qword [rbp + 0x140]
or rdi, 0xffffffffffffffff
movabs rsi, 0xffffffffffffff0
test r8, r8
je 0x180007bee
mov rcx, rdi
nop word [rax + rax]
inc rcx
cmp word [r8 + rcx*2], r15w
jne 0x180007b80
inc ecx
cmp ecx, 0x3fffffff
jg 0x180007bee
movsxd rax, ecx
add rax, rax
lea rdx, [rax + 0xf]
cmp rdx, rax
ja 0x180007ba6
mov rdx, rsi
and rdx, 0xfffffffffffffff0
mov rax, rdx
call fcn.180047280
sub rsp, rdx
lea rbx, [rsp + 0x40]
test rbx, rbx
je 0x180007bee
mov byte [rbx], r15b
lea eax, [rcx + rcx]
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
mov r9d, edi
xor edx, edx
lea ecx, [rdx + 3]
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
cmove rbx, r15
jmp 0x180007bf1
mov rbx, r15
mov rdx, rbx
lea rcx, [rbp + 0x198]
call fcn.180011ec0
nop
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp + 0x1e0]
call fcn.18004c910
lea rdx, str.Download_Cookie_is__s
lea rcx, [rbp + 0x1e0]
call fcn.18000cdd0
nop
lea rax, [rbp + 0x198]
cmp qword [rbp + 0x1b0], 0x10
cmovae rax, qword [rbp + 0x198]
mov qword [rbp], rax
lea rax, [rbp]
mov qword [rbp + 8], rax
lea rax, [fcn.180009b40]
mov qword [rbp + 0x10], rax
lea rax, [0x180009b50]
mov qword [rbp + 0x18], rax
cmp byte [rbp + 0x224], 0
je 0x180007c77
lea rcx, [rbp + 0x1e0]
call fcn.180017030
lea rdx, [rbp + 8]
lea rcx, [rbp + 0x1e0]
call fcn.180009b90
mov r8d, dword [rbp + 0x21c]
inc r8d
mov dword [rbp + 0x21c], r8d
cmp qword [rbp + 0x210], 0
je 0x180007ceb
mov r9d, dword [rbp + 0x220]
cmp r8d, r9d
jge 0x180007ceb
mov r10, qword [rbp + 0x1f8]
nop word [rax + rax]
movsxd rcx, r8d
mov rax, rcx
shr rax, 5
lea rdx, [r10 + rax*4]
and ecx, 0x1f
mov eax, 1
shl eax, cl
test dword [rdx], eax
je 0x180007ceb
inc r8d
mov dword [rbp + 0x21c], r8d
cmp r8d, r9d
jl 0x180007cc0
lea rdx, [rbp + 0x170]
lea rcx, [rbp + 0x1e0]
call fcn.18001d5a0
cmp qword [rax + 0x18], 0x10
jb 0x180007d08
mov rax, qword [rax]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov rax, qword [rbp + 0x188]
cmp rax, 0x10
jb 0x180007d6d
inc rax
mov rcx, qword [rbp + 0x170]
cmp rax, 0x1000
jb 0x180007d68
test cl, 0x1f
je 0x180007d3b
call fcn.180057aec
int3
mov rax, qword [rcx - 8]
cmp rax, rcx
jb 0x180007d4a
call fcn.180057aec
int3
sub rcx, rax
cmp rcx, 8
jae 0x180007d59
call fcn.180057aec
int3
cmp rcx, 0x27
jbe 0x180007d65
call fcn.180057aec
int3
mov rcx, rax
call fcn.180046964
xor edx, edx
mov r8d, 0x800
lea rcx, [rbp + 0x620]
call fcn.18004c910
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp + 0x410]
call fcn.18004c910
mov r9d, 1
lea r8d, [r9 + 0xf]
lea rdx, [rbp + 0x410]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x180007eb8
lea rdx, str._sDownloader.exe
lea rcx, [rbp + 0x30]
call fcn.18000cf50
mov rbx, rax
lea rax, [rbp + 0x410]
mov qword [rbp + 8], rax
lea rax, [fcn.180009b40]
mov qword [rbp + 0x10], rax
lea rax, [0x180009b60]
mov qword [rbp + 0x18], rax
cmp byte [rbx + 0x44], 0
je 0x180007df8
mov rcx, rbx
call fcn.180017150
lea rdx, [rbp + 8]
mov rcx, rbx
call fcn.180009cb0
mov eax, dword [rbx + 0x3c]
inc eax
mov dword [rbx + 0x3c], eax
cmp qword [rbx + 0x30], 0
je 0x180007e51
mov r10d, dword [rbx + 0x40]
cmp eax, r10d
jge 0x180007e51
nop dword [rax]
movsxd r9, dword [rbx + 0x3c]
mov rcx, r9
mov rdx, qword [rbx + 0x18]
mov rax, r9
shr rax, 5
lea r8, [rdx + rax*4]
and ecx, 0x1f
mov eax, 1
shl eax, cl
test dword [r8], eax
je 0x180007e51
lea eax, [r9 + 1]
mov dword [rbx + 0x3c], eax
cmp eax, r10d
jl 0x180007e20
mov rdx, rbx
lea rcx, [rbp + 0x170]
call fcn.18000c240
nop
lea rcx, [rbp + 0x30]
call fcn.18000f690
lea r8, [rbp + 0x170]
cmp qword [rbp + 0x188], 8
cmovae r8, qword [rbp + 0x170]
mov edx, 0x400
lea rcx, [rbp + 0x620]
call fcn.180044440
nop
mov r8, qword [rbp + 0x188]
cmp r8, 8
jb 0x180007ed0
inc r8
mov rdx, qword [rbp + 0x170]
lea rcx, [rbp + 0x170]
call fcn.180017b70
jmp 0x180007ed0
lea r8, str.C:UserschenhaoDesktopDownloader.exe
mov edx, 0x400
lea rcx, [rbp + 0x620]
call fcn.180044440
mov edx, 0x400
lea rcx, [rbp + 0x620]
call fcn.18003e6e0
mov qword [rbp + 0x168], 7
mov qword [rbp + 0x160], r15
mov word [rbp + 0x150], r15w
cmp qword [rbp + 0x1a8], 0
jne 0x18000804e
lea rdx, [0x18007c3b0]
lea rcx, [rbp + 0x30]
call fcn.18000cf50
mov rbx, rax
lea rax, [rbp + 0x140]
mov qword [rbp + 8], rax
lea rax, [fcn.180009b40]
mov qword [rbp + 0x10], rax
lea rax, [0x180009b80]
mov qword [rbp + 0x18], rax
cmp byte [rbx + 0x44], 0
je 0x180007f4b
mov rcx, rbx
call fcn.180017150
lea rdx, [rbp + 8]
mov rcx, rbx
call fcn.180009cb0
mov eax, dword [rbx + 0x3c]
inc eax
mov dword [rbx + 0x3c], eax
cmp qword [rbx + 0x30], 0
je 0x180007fa1
mov r10d, dword [rbx + 0x40]
cmp eax, r10d
jge 0x180007fa1
nop
movsxd r9, dword [rbx + 0x3c]
mov rcx, r9
mov rdx, qword [rbx + 0x18]
mov rax, r9
shr rax, 5
lea r8, [rdx + rax*4]
and ecx, 0x1f
mov eax, 1
shl eax, cl
test dword [r8], eax
je 0x180007fa1
lea eax, [r9 + 1]
mov dword [rbx + 0x3c], eax
cmp eax, r10d
jl 0x180007f70
mov rdx, rbx
lea rcx, [rbp + 0x170]
call fcn.18000c240
mov rbx, rax
lea rax, [rbp + 0x150]
cmp rax, rbx
je 0x18000800c
mov r8, qword [rbp + 0x168]
cmp r8, 8
jb 0x180007fe2
inc r8
mov rdx, qword [rbp + 0x150]
lea rcx, [rbp + 0x150]
call fcn.180017b70
mov qword [rbp + 0x168], 7
mov qword [rbp + 0x160], r15
mov word [rbp + 0x150], r15w
mov rdx, rbx
lea rcx, [rbp + 0x150]
call fcn.180013720
nop
mov r8, qword [rbp + 0x188]
cmp r8, 8
jb 0x18000802f
inc r8
mov rdx, qword [rbp + 0x170]
lea rcx, [rbp + 0x170]
call fcn.180017b70
mov qword [rbp + 0x188], 7
mov qword [rbp + 0x180], r15
mov word [rbp + 0x170], r15w
jmp 0x18000819b
lea rbx, [rbp + 0x198]
cmp qword [rbp + 0x1b0], 0x10
cmovae rbx, qword [rbp + 0x198]
test rbx, rbx
jne 0x180008070
mov qword [rbp], r15
jmp 0x1800080c7
mov rdx, rdi
inc rdx
cmp byte [rbx + rdx], 0
jne 0x180008073
inc edx
cmp edx, 0x3fffffff
jle 0x18000808c
mov qword [rbp], r15
jmp 0x1800080c7
movsxd rax, edx
add rax, rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x18000809e
mov rcx, rsi
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.180047280
sub rsp, rcx
lea rcx, [rsp + 0x40]
mov r9d, 3
mov r8d, edx
mov rdx, rbx
call fcn.180011390
mov qword [rbp], rax
lea rdx, str._s__s
lea rcx, [rbp + 0x30]
call fcn.18000cf50
nop
lea rdx, [rbp + 0x140]
mov rcx, rax
call fcn.18000a100
lea rdx, [rbp]
mov rcx, rax
call fcn.18000a100
mov rdx, rax
lea rcx, [rbp + 0x170]
call fcn.18000c240
mov rbx, rax
lea rax, [rbp + 0x150]
cmp rax, rbx
je 0x18000815e
mov r8, qword [rbp + 0x168]
cmp r8, 8
jb 0x180008134
inc r8
mov rdx, qword [rbp + 0x150]
lea rcx, [rbp + 0x150]
call fcn.180017b70
mov qword [rbp + 0x168], 7
mov qword [rbp + 0x160], r15
mov word [rbp + 0x150], r15w
mov rdx, rbx
lea rcx, [rbp + 0x150]
call fcn.180013720
nop
mov r8, qword [rbp + 0x188]
cmp r8, 8
jb 0x180008181
inc r8
mov rdx, qword [rbp + 0x170]
lea rcx, [rbp + 0x170]
call fcn.180017b70
mov qword [rbp + 0x188], 7
mov qword [rbp + 0x180], r15
mov word [rbp + 0x170], r15w
lea rcx, [rbp + 0x30]
call fcn.18000f690
lea rdx, [rbp + 0x150]
cmp qword [rbp + 0x168], 8
cmovae rdx, qword [rbp + 0x150]
test rdx, rdx
jne 0x1800081c5
mov rax, r15
jmp 0x18000821c
mov rax, rdi
nop dword [rax + rax]
inc rax
cmp word [rdx + rax*2], 0
jne 0x1800081d0
inc eax
cmp eax, 0x3fffffff
jle 0x1800081e8
mov rax, r15
jmp 0x18000821c
lea r8d, [rax + rax]
cdqe
add rax, rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x1800081fd
mov rcx, rsi
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.180047280
sub rsp, rcx
lea rcx, [rsp + 0x40]
mov r9d, 3
call fcn.180011a60
mov qword [rbp + 0x20], setsockopt
mov qword [rbp + 0x18], r15
mov byte [rbp + 8], 0
cmp byte [rax], 0
jne 0x180008236
mov r8, r15
jmp 0x18000824a
mov r8, rdi
nop dword [rax]
inc r8
cmp byte [rax + r8], 0
jne 0x180008240
mov rdx, rax
lea rcx, [rbp + 8]
call fcn.1800024c0
nop
lea r8, [rbp + 8]
lea rdx, [rbp + 0x1b8]
lea rcx, [rbp + 0x190]
call fcn.180002c80
nop
lea rcx, [rbp + 8]
call fcn.180002740
lea rdx, [rbp + 0x1b8]
cmp qword [rbp + 0x1d0], 0x10
cmovae rdx, qword [rbp + 0x1b8]
test rdx, rdx
jne 0x1800082a0
mov rax, r15
jmp 0x1800082ec
inc rdi
cmp byte [rdx + rdi], 0
jne 0x1800082a0
inc edi
cmp edi, 0x3fffffff
jle 0x1800082b8
mov rax, r15
jmp 0x1800082ec
movsxd rax, edi
add rax, rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x1800082ca
mov rcx, rsi
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.180047280
sub rsp, rcx
lea rcx, [rsp + 0x40]
mov r9d, 3
mov r8d, edi
call fcn.180011390
mov dword [rsp + 0x28], 1
mov qword [rsp + 0x20], r15
mov r9, rax
lea r8, [rbp + 0x620]
lea rdx, str.open
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_ShellExecuteW]
mov qword [rbp + 0x148], rax
cmp eax, 0x20
cmovg r14d, r15d
lea rdx, str.Download_notify:_DownloadPath_is__s__url_is__s__ShellExecute_HINSTANCE_is_0x_x
lea rcx, [rbp + 0x30]
call fcn.18000cf50
nop
lea rdx, [rbp + 0x620]
mov rcx, rax
call fcn.180009fc0
lea rdx, [rbp + 0x140]
mov rcx, rax
call fcn.18000a100
lea rdx, [rbp + 0x148]
mov rcx, rax
call fcn.18000a060
mov rdx, rax
lea rcx, [rbp + 0x170]
call fcn.18000c240
mov rbx, rax
lea rax, [rbp + 0x150]
cmp rax, rbx
je 0x1800083c9
mov r8, qword [rbp + 0x168]
cmp r8, 8
jb 0x18000839f
inc r8
mov rdx, qword [rbp + 0x150]
lea rcx, [rbp + 0x150]
call fcn.180017b70
mov qword [rbp + 0x168], 7
mov qword [rbp + 0x160], r15
mov word [rbp + 0x150], r15w
mov rdx, rbx
lea rcx, [rbp + 0x150]
call fcn.180013720
nop
mov r8, qword [rbp + 0x188]
cmp r8, 8
jb 0x1800083ec
inc r8
mov rdx, qword [rbp + 0x170]
lea rcx, [rbp + 0x170]
call fcn.180017b70
mov qword [rbp + 0x188], 7
mov qword [rbp + 0x180], r15
mov word [rbp + 0x170], r15w
lea rcx, [rbp + 0x30]
call fcn.18000f690
lea rcx, [rbp + 0x150]
cmp qword [rbp + 0x168], 8
cmovae rcx, qword [rbp + 0x150]
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, qword [rbp + 0x140]
call qword [sym.imp.ole32.dll_CoTaskMemFree]
nop
lea rcx, [rbp + 0x1b8]
call fcn.180002740
nop
mov r8, qword [rbp + 0x168]
cmp r8, 8
jb 0x18000846a
inc r8
mov rdx, qword [rbp + 0x150]
lea rcx, [rbp + 0x150]
call fcn.180017b70
mov qword [rbp + 0x168], 7
mov qword [rbp + 0x160], r15
mov word [rbp + 0x150], r15w
lea rcx, [rbp + 0x1e0]
call fcn.18000f5f0
nop
lea rcx, [rbp + 0x198]
call fcn.180002740
mov eax, r14d
mov rcx, qword [rbp + 0xe20]
xor rcx, rbp
call fcn.180046a00
mov rbx, qword [rbp + 0xe60]
lea rsp, [rbp + 0xe30]
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret