Function at 0x40ac5f
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library

Disassembly:
mov eax, 0x4bbeb1
call fcn.004bafb0
sub esp, 0x1e0
lea eax, [ebp - 0x1ec]
push ebx
push esi
push edi
push eax
push 0x202
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
je 0x40ac92
mov ecx, str.An_internal_error_has_occurred_in_the_debugger_engine._nContinue_running_the_script_without_the_debugger_
jmp 0x40aee5
push 6
pop edi
push edi
push 1
push 2
pop esi
push esi
call dword [sym.imp.WSOCK32.dll_socket]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40aeda
and dword [ebp - 0x58], 0
xorps xmm0, xmm0
mov eax, dword [0x4eedac]
movlpd qword [ebp - 0x48], xmm0
movlpd qword [ebp - 0x40], xmm0
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x50], 1
mov dword [ebp - 0x4c], edi
test eax, eax
jne 0x40ace0
xor ecx, ecx
call fcn.00407ddf
mov dword [0x4eedac], eax
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x58]
push ecx
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
mov esi, eax
push esi
call dword [sym.imp.WSOCK32.dll_WSASetLastError]
test esi, esi
jne 0x40aed3
mov edi, dword [sym.imp.WSOCK32.dll_connect]
jmp 0x40ad38
push 0x10012
push dword [0x4f06fc]
push str.Failed_to_connect_to_an_active_debugger_client.
push dword [0x4eedf0]
call dword [sym.imp.USER32.dll_MessageBoxW]
sub eax, 3
je 0x40ae96
dec eax
sub eax, 1
je 0x40aea2
mov eax, dword [ebp - 0x14]
push dword [eax + 0x10]
push dword [eax + 0x18]
push ebx
call edi
mov esi, eax
test esi, esi
jne 0x40ad09
mov eax, dword [0x4eeda8]
mov edi, dword [ebp - 0x14]
test eax, eax
jne 0x40ad63
push 2
pop ecx
call fcn.00407ddf
mov dword [0x4eeda8], eax
push edi
call eax
test esi, esi
jne 0x40aed3
xor eax, eax
mov dword [0x4effd8], ebx
mov edi, vtable.CKuStringT_wchar_t__class_CKuStringUtilW_.0
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], edi
mov byte [ebp - 0x18], al
push str.DBGP_IDEKEY
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], eax
call fcn.0040bf07
mov esi, 0x4d3ee8
mov ecx, dword [eax + 4]
mov eax, esi
test ecx, ecx
je 0x40ada8
cmp dword [ecx], 0
cmovne eax, dword [ecx]
push ecx
push eax
lea ecx, [ebp - 0x38]
call fcn.0040c351
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], edi
test ecx, ecx
je 0x40adc1
call fcn.0040c419
and dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], edi
mov byte [ebp - 0x18], 0
push str.DBGP_COOKIE
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call fcn.0040bf07
mov eax, dword [eax + 4]
test eax, eax
je 0x40adea
cmp dword [eax], 0
cmovne esi, dword [eax]
push ecx
push esi
lea ecx, [ebp - 0x2c]
call fcn.0040c351
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], edi
test ecx, ecx
je 0x40ae07
call fcn.0040c419
and dword [0x4f0004], 0
mov esi, 0x4d42de
and dword [0x4f0008], 0
mov edi, esi
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40ae29
cmp dword [eax], 0
cmovne edi, dword [eax]
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40ae36
cmp dword [eax], 0
cmovne esi, dword [eax]
push dword [0x4f06fc]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push edi
push esi
push str._init_appid_AutoHotkey__ide_key__e__session__e__thread__u__parent___language_AutoHotkey__protocol_version_1.0__fileuri__r___
push 0x4efffc
call fcn.0040b2d0
add esp, 0x18
mov ecx, 0x4effc8
call fcn.0040abc0
mov ecx, dword [ebp - 0x28]
mov esi, vtable.CKuStringT_char__class_CKuStringUtilA_.0
mov dword [ebp - 0x2c], esi
test eax, eax
jne 0x40aeb0
mov eax, dword [0x4f068c]
mov dword [0x4effdc], eax
test ecx, ecx
je 0x40ae83
call fcn.004052b0
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x38], esi
test ecx, ecx
je 0x40ae92
call fcn.004052b0
xor eax, eax
jmp 0x40aeea
push 4
mov ecx, 0x4f0050
call fcn.0043b820
push ebx
call dword [sym.imp.WSOCK32.dll_closesocket]
mov eax, 0x3e6
jmp 0x40aeea
or dword [0x4effd8], 0xffffffff
test ecx, ecx
je 0x40aec0
call fcn.004052b0
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x38], esi
test ecx, ecx
je 0x40aed3
call fcn.004052b0
push ebx
call dword [sym.imp.WSOCK32.dll_closesocket]
call dword [sym.imp.WSOCK32.dll_WSACleanup]
mov ecx, str.Failed_to_connect_to_an_active_debugger_client._nContinue_running_the_script_without_the_debugger_
call fcn.0040af96
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 8