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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4c8de8
push eax
mov dword fs:[0], esp
lea eax, [ebp - 0x200]
sub esp, 0x1f8
push ebx
push esi
push edi
push eax
push 0x202
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
je 0x40ad81
mov ecx, str.An_internal_error_has_occurred_in_the_debugger_engine._nContinue_running_the_script_without_the_debugger_
jmp 0x40b228
push 6
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov ebx, eax
mov dword [ebp - 0x14], ebx
cmp ebx, 0xffffffff
je 0x40b21d
mov eax, dword [0x4eb4e0]
xorps xmm0, xmm0
mov dword [ebp - 0x70], 0
movlpd qword [ebp - 0x60], xmm0
movlpd qword [ebp - 0x58], xmm0
mov dword [ebp - 0x6c], 2
mov dword [ebp - 0x68], 1
mov dword [ebp - 0x64], 6
test eax, eax
jne 0x40add9
xor ecx, ecx
call fcn.004069f0
mov dword [0x4eb4e0], eax
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp - 0x70]
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 0x40b216
mov eax, dword [ebp - 0x10]
push dword [eax + 0x10]
push dword [eax + 0x18]
push ebx
call dword [sym.imp.WSOCK32.dll_connect]
mov esi, eax
test esi, esi
je 0x40ae5c
mov edi, dword [sym.imp.USER32.dll_MessageBoxA]
nop word [eax + eax]
push 0x10012
push dword [0x4ea088]
push str.Failed_to_connect_to_an_active_debugger_client.
push dword [0x4e7950]
call edi
sub eax, 3
je 0x40aebb
sub eax, 2
je 0x40aec9
mov eax, dword [ebp - 0x10]
push dword [eax + 0x10]
push dword [eax + 0x18]
push ebx
call dword [sym.imp.WSOCK32.dll_connect]
mov esi, eax
test esi, esi
jne 0x40ae20
mov eax, dword [0x4eb4dc]
mov edi, dword [ebp - 0x10]
test eax, eax
jne 0x40ae75
lea ecx, [eax + 2]
call fcn.004069f0
mov dword [0x4eb4dc], eax
push edi
call eax
test esi, esi
jne 0x40b216
mov dword [0x4e6320], ebx
mov dword [ebp - 0x38], vtable.CKuStringT_char__class_CKuStringUtilA_.0
mov dword [ebp - 0x34], esi
mov byte [ebp - 0x30], 0
push str.DBGP_IDEKEY
lea ecx, [ebp - 0x38]
mov dword [ebp - 4], esi
call fcn.0040c000
mov ebx, 0x4d0335
mov eax, dword [eax + 4]
test eax, eax
je 0x40aee8
mov eax, dword [eax]
mov ecx, ebx
test eax, eax
cmovne ecx, eax
jmp 0x40aeed
push 0
push 4
mov ecx, 0x4e9a70
call fcn.0042bef0
push ebx
call dword [sym.imp.WSOCK32.dll_closesocket]
mov eax, 0x3e6
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, 0x4d0335
mov dword [ebp - 0x28], 0
mov byte [ebp - 0x24], 0
push ecx
mov byte [ebp - 4], 1
lea edx, [ebp - 0x2c]
push 0xffffffffffffffff
mov dword [ebp - 0x2c], 0x4d496c
call fcn.00497ab0
add esp, 8
mov esi, dword [ebp - 0x34]
mov dword [ebp - 0x38], vtable.CKuStringT_char__class_CKuStringUtilA_.0
test esi, esi
je 0x40af45
mov eax, dword [esi + 0x10]
add eax, 0xffffffff
mov dword [esi + 0x10], eax
jne 0x40af45
mov eax, dword [esi + 4]
test eax, eax
je 0x40af3a
push eax
call fcn.004b2343
add esp, 4
push 0x14
push esi
call fcn.004ae4c5
add esp, 8
mov dword [ebp - 0x44], vtable.CKuStringT_char__class_CKuStringUtilA_.0
mov dword [ebp - 0x40], 0
mov byte [ebp - 0x3c], 0
push str.DBGP_COOKIE
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 4
call fcn.0040c000
mov eax, dword [eax + 4]
test eax, eax
je 0x40af7a
mov eax, dword [eax]
mov ecx, ebx
test eax, eax
cmovne ecx, eax
jmp 0x40af7f
mov ecx, 0x4d0335
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x18], 0
push ecx
mov byte [ebp - 4], 5
lea edx, [ebp - 0x20]
push 0xffffffffffffffff
mov dword [ebp - 0x20], 0x4d496c
call fcn.00497ab0
add esp, 8
mov esi, dword [ebp - 0x40]
mov dword [ebp - 0x44], vtable.CKuStringT_char__class_CKuStringUtilA_.0
test esi, esi
je 0x40afd7
mov eax, dword [esi + 0x10]
add eax, 0xffffffff
mov dword [esi + 0x10], eax
jne 0x40afd7
mov eax, dword [esi + 4]
test eax, eax
je 0x40afcc
push eax
call fcn.004b2343
add esp, 4
push 0x14
push esi
call fcn.004ae4c5
add esp, 8
mov esi, dword [ebp - 0x1c]
mov dword [0x4e6340], 0
mov dword [0x4e6344], 0
test esi, esi
je 0x40affd
mov eax, dword [esi]
mov edi, ebx
test eax, eax
cmovne edi, eax
jmp 0x40b002
mov edi, 0x4d0335
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x40b017
mov eax, dword [ecx]
test eax, eax
mov ecx, ebx
cmovne ecx, eax
mov dword [ebp + 0xc], ecx
jmp 0x40b01e
mov dword [ebp + 0xc], 0x4d0335
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push edi
push dword [ebp + 0xc]
push str._init_appid_AutoHotkey__ide_key__e__session__e__thread__u__parent___language_AutoHotkey__protocol_version_1.0__fileuri_
push 0x4e6338
call fcn.0040b320
mov dword [ebp - 0x4c], 0
mov byte [ebp - 0x48], 0
add esp, 0x10
mov byte [ebp - 4], 8
mov ecx, dword [0x4ea088]
lea edx, [ebp - 0x50]
mov dword [ebp - 0x50], 0x4d496c
push 0xffffffffffffffff
call fcn.00497ab0
mov byte [ebp - 4], 7
add esp, 8
mov edi, dword [ebp - 0x4c]
test edi, edi
je 0x40b078
mov eax, dword [edi]
test eax, eax
cmovne ebx, eax
jmp 0x40b07f
mov ebx, 0x4d0335
xor edi, edi
push ebx
mov ecx, 0x4e6338
call fcn.0040b5f0
mov dword [ebp - 0x50], vtable.CKuStringT_char__class_CKuStringUtilA_.0
test edi, edi
je 0x40b0be
mov eax, dword [edi + 0x10]
add eax, 0xffffffff
mov dword [edi + 0x10], eax
jne 0x40b0bb
mov eax, dword [edi + 4]
test eax, eax
je 0x40b0b0
push eax
call fcn.004b2343
add esp, 4
push 0x14
push edi
call fcn.004ae4c5
add esp, 8
mov esi, dword [ebp - 0x1c]
cmp dword [0x4e6344], 0
jne 0x40b102
mov eax, dword [0x4e6340]
mov ecx, 0x4e6338
add eax, 3
push eax
call fcn.0040b990
test eax, eax
jne 0x40b102
mov ecx, dword [0x4e6338]
add ecx, dword [0x4e6340]
mov ax, word [0x4d0d58]
mov word [ecx], ax
mov al, byte [0x4d0d5a]
mov byte [ecx + 2], al
add dword [0x4e6340], 3
mov ecx, 0x4e6310
call fcn.0040ac40
mov dword [ebp - 0x20], vtable.CKuStringT_char__class_CKuStringUtilA_.0
test eax, eax
jne 0x40b19e
mov eax, dword [0x4e9dfc]
mov dword [0x4e6324], eax
test esi, esi
je 0x40b152
mov eax, dword [esi + 0x10]
add eax, 0xffffffff
mov dword [esi + 0x10], eax
jne 0x40b152
mov esi, dword [ebp - 0x1c]
mov eax, dword [esi + 4]
test eax, eax
je 0x40b147
push eax
call fcn.004b2343
add esp, 4
push 0x14
push esi
call fcn.004ae4c5
add esp, 8
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x2c], vtable.CKuStringT_char__class_CKuStringUtilA_.0
test ecx, ecx
je 0x40b189
mov eax, dword [ecx + 0x10]
add eax, 0xffffffff
mov dword [ecx + 0x10], eax
jne 0x40b189
mov esi, dword [ebp - 0x28]
mov eax, dword [esi + 4]
test eax, eax
je 0x40b17e
push eax
call fcn.004b2343
add esp, 4
push 0x14
push esi
call fcn.004ae4c5
add esp, 8
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov dword [0x4e6320], 0xffffffff
test esi, esi
je 0x40b1d5
mov eax, dword [esi + 0x10]
add eax, 0xffffffff
mov dword [esi + 0x10], eax
jne 0x40b1d5
mov esi, dword [ebp - 0x1c]
mov eax, dword [esi + 4]
test eax, eax
je 0x40b1ca
push eax
call fcn.004b2343
add esp, 4
push 0x14
push esi
call fcn.004ae4c5
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x2c], vtable.CKuStringT_char__class_CKuStringUtilA_.0
test ecx, ecx
je 0x40b213
mov eax, dword [ecx + 0x10]
add eax, 0xffffffff
mov dword [ecx + 0x10], eax
jne 0x40b213
mov esi, dword [ebp - 0x28]
mov eax, dword [esi + 4]
test eax, eax
je 0x40b208
push eax
call fcn.004b2343
add esp, 4
push 0x14
push esi
call fcn.004ae4c5
add esp, 8
mov ebx, dword [ebp - 0x14]
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.0040b2d0
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8