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

Disassembly:
mov eax, 0x4b6858
call fcn.004b5980
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 0x40a9bf
mov ecx, 0x4d1ac0
jmp 0x40ac14
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 0x40ac09
and dword [ebp - 0x58], 0
xorps xmm0, xmm0
mov eax, dword [0x4e8c8c]
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 0x40aa0d
xor ecx, ecx
call fcn.00407af2
mov dword [0x4e8c8c], 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 0x40ac02
mov edi, dword [sym.imp.WSOCK32.dll_connect]
jmp 0x40aa65
push 0x10012
push dword [0x4ea5e4]
push 0x4d1bc0
push dword [0x4e8ccc]
call dword [sym.imp.USER32.dll_MessageBoxW]
sub eax, 3
je 0x40abc5
dec eax
sub eax, 1
je 0x40abd1
mov eax, dword [ebp - 0x14]
push dword [eax + 0x10]
push dword [eax + 0x18]
push ebx
call edi
mov esi, eax
test esi, esi
jne 0x40aa36
mov eax, dword [0x4e8c88]
mov edi, dword [ebp - 0x14]
test eax, eax
jne 0x40aa90
push 2
pop ecx
call fcn.00407af2
mov dword [0x4e8c88], eax
push edi
call eax
test esi, esi
jne 0x40ac02
xor eax, eax
mov dword [0x4e9eb8], 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 0x4d1c20
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], eax
call fcn.0040bbeb
mov esi, 0x4ceea8
mov ecx, dword [eax + 4]
mov eax, esi
test ecx, ecx
je 0x40aad5
cmp dword [ecx], 0
cmovne eax, dword [ecx]
push ecx
push eax
lea ecx, [ebp - 0x38]
call fcn.0040c037
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], edi
test ecx, ecx
je 0x40aaee
call fcn.0040c0ff
and dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], edi
mov byte [ebp - 0x18], 0
push 0x4d1c38
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call fcn.0040bbeb
mov eax, dword [eax + 4]
test eax, eax
je 0x40ab17
cmp dword [eax], 0
cmovne esi, dword [eax]
push ecx
push esi
lea ecx, [ebp - 0x2c]
call fcn.0040c037
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], edi
test ecx, ecx
je 0x40ab34
call fcn.0040c0ff
and dword [0x4e9ee4], 0
mov esi, 0x4cf2ae
and dword [0x4e9ee8], 0
mov edi, esi
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x40ab56
cmp dword [eax], 0
cmovne edi, dword [eax]
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40ab63
cmp dword [eax], 0
cmovne esi, dword [eax]
push dword [0x4ea5e4]
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
push eax
push edi
push esi
push 0x4d1c50
push 0x4e9edc
call fcn.0040aff6
add esp, 0x18
mov ecx, 0x4e9ea8
push 0
call fcn.0040a8e9
mov ecx, dword [ebp - 0x28]
mov esi, vtable.CKuStringT_char__class_CKuStringUtilA_.0
mov dword [ebp - 0x2c], esi
test eax, eax
jne 0x40abdf
mov eax, dword [0x4ea574]
mov dword [0x4e9ebc], eax
test ecx, ecx
je 0x40abb2
call fcn.00405040
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x38], esi
test ecx, ecx
je 0x40abc1
call fcn.00405040
xor eax, eax
jmp 0x40ac19
push 4
mov ecx, 0x4e9f30
call fcn.0043a0c0
push ebx
call dword [sym.imp.WSOCK32.dll_closesocket]
mov eax, 0x3e6
jmp 0x40ac19
or dword [0x4e9eb8], 0xffffffff
test ecx, ecx
je 0x40abef
call fcn.00405040
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x38], esi
test ecx, ecx
je 0x40ac02
call fcn.00405040
push ebx
call dword [sym.imp.WSOCK32.dll_closesocket]
call dword [sym.imp.WSOCK32.dll_WSACleanup]
mov ecx, 0x4d1cd8
call fcn.0040acc5
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 8