Function at 0x4ac71c
Capabilities:
Enumerate gui resources
Initialize winsock library

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov dword [rax + 0x20], r9d
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x4f0
mov rsi, r8
lea rdx, [rax - 0x3e8]
xor ecx, ecx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ebx, 0x5c
lea rcx, [rsp + 0x140]
mov edx, ebx
call fcn.006a86d4
xor r14d, r14d
or rbp, 0xffffffffffffffff
mov rcx, rax
lea r13d, [rbx - 0x5b]
cmp rax, r14
je 0x4ac78c
lea rax, [rsp + 0x140]
sub rcx, rax
sar rcx, 1
jmp 0x4ac7a2
xor eax, eax
lea rdi, [rsp + 0x140]
mov rcx, rbp
repne scasw ax, word [rdi]
not rcx
sub rcx, r13
mov r8, rcx
lea r9, [rsp + 0x20]
lea rdx, [rsp + 0x140]
lea rcx, [rsp + 0xa0]
call fcn.0042100c
lea r8, [rsp + 0xa0]
lea rdx, [0x0079a410]
lea rcx, [rsp + 0x50]
call fcn.00420494
mov rcx, qword [rsp + 0x90]
mov rdx, qword [rsp + 0x98]
mov rax, rcx
mov rdi, r14
sub rax, rdx
sar rax, 1
je 0x4ac834
cmp word [rdx + rdi*2], 0x3a
je 0x4ac80a
cmp word [rdx + rdi*2], bx
je 0x4ac80a
cmp word [rdx + rdi*2], 0x2f
jne 0x4ac823
mov eax, 0x5f
mov word [rdx + rdi*2], ax
mov rdx, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x90]
mov rax, rcx
add rdi, r13
sub rax, rdx
sar rax, 1
cmp rdi, rax
jb 0x4ac7f6
sub rcx, rdx
mov ebx, 2
sar rcx, 1
mov rax, rbx
add rcx, rbx
mul rcx
cmovo rax, rbp
mov rcx, rax
call fcn.006a43c4
mov rcx, qword [rsp + 0x98]
mov rdi, rax
mov rdx, rax
movzx eax, word [rcx]
add rcx, rbx
mov word [rdx], ax
add rdx, rbx
cmp ax, r14w
jne 0x4ac862
mov rcx, rdi
call qword [sym.imp.USER32.dll_CharLowerW]
mov r8, rdi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov r12, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [0x004ac718]
mov ecx, reloc.WS2_32.dll_shutdown
mov r15d, eax
call fcn.006a87c4
mov edx, r13d
xor ecx, ecx
call fcn.006a8da8
lea rdx, [0x0079a418]
mov rcx, rsi
mov bl, r14b
call fcn.006a633c
movzx ecx, byte [0x008669f1]
cmp rax, r14
lea rdx, str._magnet
cmovne ecx, r13d
mov byte [0x008669f1], cl
mov rcx, rsi
call fcn.006a633c
lea rdx, [0x0079a430]
movzx ebp, r14b
cmp rax, r14
mov rcx, rsi
cmovne ebp, r13d
call fcn.006a633c
lea rdx, str._forcerestart
cmp rax, r14
mov eax, 1
movzx r13d, r14b
mov rcx, rsi
cmovne r13d, eax
call fcn.006a633c
lea rdx, [0x00798848]
movzx r14d, r14b
test rax, rax
mov eax, 1
mov rcx, rsi
cmovne r14d, eax
call fcn.006a633c
test rax, rax
jne 0x4ac97f
lea rdx, str..DCLS
mov rcx, rsi
call fcn.006a633c
test rax, rax
jne 0x4ac97f
lea rdx, [0x0079a448]
mov rcx, rsi
call fcn.006a633c
test rax, rax
jne 0x4ac97f
lea rdx, str..XML.BZ2
mov rcx, rsi
call fcn.006a633c
test rax, rax
je 0x4ac988
mov eax, 1
mov bl, al
jmp 0x4ac98d
mov eax, 1
test r14b, r14b
jne 0x4acb1a
cmp r15d, 0xb7
jne 0x4acb1a
test bpl, bpl
jne 0x4ac9c8
test bl, bl
jne 0x4ac9c8
lea r8, str.greylink_5.98
lea rdx, str.This_instance_of_greylink_dc_is_already_running
mov r9d, 0x40010
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
and qword [rsp + 0x28], 0
lea rdx, [rsp + 0x28]
lea rcx, [0x004aa6a8]
call qword [sym.imp.USER32.dll_EnumWindows]
mov rbp, qword [rsp + 0x28]
mov ebx, 0x100
test rbp, rbp
je 0x4aca8b
mov rcx, rbp
call qword [sym.imp.USER32.dll_SetForegroundWindow]
lea r8, [rsp + 0x20]
lea rcx, [rsp + 0xf0]
mov rdx, rsi
call fcn.004023b4
mov rdx, qword [rsp + 0x138]
mov rax, qword [rsp + 0x130]
and qword [rsp + 0x30], 0
sub rax, rdx
xor r8d, r8d
sar rax, 1
mov qword [rsp + 0x40], rdx
lea r9, [rsp + 0x30]
lea eax, [rax + rax + 2]
lea edx, [r8 + 0x4a]
mov rcx, rbp
mov dword [rsp + 0x38], eax
call qword [sym.imp.USER32.dll_SendMessageW]
mov rcx, qword [rsp + 0x138]
lea r11, [rsp + 0xf0]
cmp rcx, r11
je 0x4aca8b
test rcx, rcx
je 0x4aca8b
mov rdx, qword [rsp + 0xf0]
sub rdx, rcx
sar rdx, 1
add rdx, rdx
cmp rdx, rbx
jbe 0x4aca86
call fcn.006a4944
jmp 0x4aca8b
call fcn.006a3610
test r12, r12
je 0x4aca99
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call fcn.006a5088
mov rcx, qword [rsp + 0x98]
lea rdx, [rsp + 0x50]
cmp rcx, rdx
je 0x4acad7
test rcx, rcx
je 0x4acad7
mov rdx, qword [rsp + 0x50]
sub rdx, rcx
sar rdx, 1
add rdx, rdx
cmp rdx, rbx
jbe 0x4acad2
call fcn.006a4944
jmp 0x4acad7
call fcn.006a3610
mov rcx, qword [rsp + 0xe8]
lea rax, [rsp + 0xa0]
cmp rcx, rax
je 0x4acb13
test rcx, rcx
je 0x4acb13
mov rdx, qword [rsp + 0xa0]
sub rdx, rcx
sar rdx, 1
add rdx, rdx
cmp rdx, rbx
jbe 0x4acb0e
call fcn.006a4944
jmp 0x4acb13
call fcn.006a3610
xor eax, eax
jmp 0x4acd75
cmp r13b, al
jne 0x4acb2a
mov ecx, 0x9c4
call qword [sym.imp.KERNEL32.dll_Sleep]
mov edx, 2
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitializeEx]
lea rcx, [0x004aa9b0]
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea rdx, [rsp + 0x350]
mov ecx, 0x202
mov rbx, rax
call qword [sym.imp.WS2_32.dll_WSAStartup]
lea rcx, [rsp + 0x28]
mov dword [rsp + 0x28], 8
mov dword [rsp + 0x2c], 0x463f
call qword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
mov r8, qword [rsp + 0x530]
lea rcx, [0x008672b0]
xor r9d, r9d
xor edx, edx
call fcn.004ad338
lea rcx, str.RICHED20.DLL
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edx, dword [rsp + 0x548]
mov rcx, rsi
mov rbp, rax
call fcn.004ab6d8
xor r14d, r14d
mov r13d, eax
cmp rbp, r14
je 0x4acbc1
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp rbx, r14
je 0x4acbcf
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov rsi, qword [0x00862cb0]
lea rcx, [rsi + 0x18]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov rbx, qword [0x00867310]
cmp rbx, r14
je 0x4acc2c
mov eax, dword [rbx + 8]
cmp eax, r14d
jle 0x4acc07
mov rcx, qword [rbx]
mov rcx, qword [rcx]
call qword [sym.imp.USER32.dll_DestroyWindow]
mov rbx, qword [0x00867310]
cmp rbx, r14
je 0x4acc2c
mov rcx, qword [rbx]
cmp rcx, r14
je 0x4acc1c
call fcn.006a5528
mov qword [rbx], r14
mov rcx, rbx
mov dword [rbx + 8], r14d
mov dword [rbx + 0xc], r14d
call fcn.006a4944
lea rcx, [rsi + 0x18]
mov qword [0x00867310], r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rbx, qword [0x00867308]
cmp rbx, r14
je 0x4acc77
mov rcx, qword [rbx]
cmp rcx, r14
je 0x4acc59
call fcn.006a5528
mov qword [rbx], r14
mov rcx, qword [rbx + 8]
cmp rcx, r14
je 0x4acc6b
call fcn.006a5528
mov qword [rbx + 8], r14
mov rcx, rbx
mov dword [rbx + 0x10], r14d
call fcn.006a4944
mov rbx, qword [0x008672f8]
cmp rbx, r14
je 0x4acca6
jmp 0x4acca1
mov rcx, qword [rbx + 0x20]
cmp rcx, r14
je 0x4acc94
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_recv]
xor ecx, ecx
mov qword [rbx + 0x20], r14
call qword [rbx + 0x40]
add rbx, 0x48
cmp qword [rbx], r14
jne 0x4acc85
mov rbx, qword [0x00861c60]
mov rax, qword [0x00861c68]
jmp 0x4accce
mov rdx, qword [rbx]
cmp rdx, r14
je 0x4accca
xor ecx, ecx
call qword [rdx + 0x40]
mov rax, qword [0x00861c68]
add rbx, 8
cmp rbx, rax
jb 0x4accb6
lea rcx, [0x008672b0]
call fcn.004adf98
call qword [sym.imp.ole32.dll_CoUninitialize]
cmp r12, r14
je 0x4accf3
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call fcn.006a5088
mov rcx, qword [rsp + 0x98]
lea rdx, [rsp + 0x50]
mov ebx, 0x100
cmp rcx, rdx
je 0x4acd36
cmp rcx, r14
je 0x4acd36
mov rdx, qword [rsp + 0x50]
sub rdx, rcx
sar rdx, 1
add rdx, rdx
cmp rdx, rbx
jbe 0x4acd31
call fcn.006a4944
jmp 0x4acd36
call fcn.006a3610
mov rcx, qword [rsp + 0xe8]
lea rax, [rsp + 0xa0]
cmp rcx, rax
je 0x4acd72
cmp rcx, r14
je 0x4acd72
mov rdx, qword [rsp + 0xa0]
sub rdx, rcx
sar rdx, 1
add rdx, rdx
cmp rdx, rbx
jbe 0x4acd6d
call fcn.006a4944
jmp 0x4acd72
call fcn.006a3610
mov eax, r13d
mov rbx, qword [rsp + 0x538]
add rsp, 0x4f0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret