Function at 0x41b04d
Capabilities:
Connect socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
mov eax, 0x42ee79
call fcn.0041f1a0
sub esp, 0x280
mov eax, dword [0x440200]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x1fc], eax
mov eax, dword [ebp + 0x18]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x1f8], eax
lea eax, [ebp - 0x1e4]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
xor ebx, ebx
cmp eax, ebx
jne 0x41b0ae
push ebx
push 1
push 2
call sub.WS2_32.dll_socket
cmp eax, 0xffffffff
mov dword [ebp - 0x1f4], eax
jne 0x41b0b8
call sub.WS2_32.dll_WSAGetLastError
jmp 0x41b69f
push edi
call sub.WS2_32.dll_gethostbyname
cmp eax, ebx
jne 0x41b0d1
call sub.WS2_32.dll_WSAGetLastError
mov edi, dword [ebp - 0x1f4]
mov esi, eax
jmp 0x41b12b
push dword [ebp + 0xc]
mov word [ebp - 0x38], 2
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x34], eax
call sub.WS2_32.dll_htons
mov edi, dword [ebp - 0x1f4]
mov word [ebp - 0x36], ax
push 0x10
lea eax, [ebp - 0x38]
push eax
push edi
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x41b10d
call sub.WS2_32.dll_WSAGetLastError
mov esi, eax
jmp 0x41b12b
cmp dword [ebp - 0x1f8], ebx
je 0x41b138
push ebx
push dword [ebp - 0x1f8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x41b138
mov esi, 0x3e3
push edi
call sub.WS2_32.dll_closesocket
mov eax, esi
jmp 0x41b69f
cmp dword [esi + 0x18], 0x10
mov eax, dword [esi + 0x14]
jb 0x41b146
mov esi, dword [esi + 4]
jmp 0x41b149
add esi, 4
push eax
lea eax, [ebp - 0x54]
push esi
push eax
call fcn.0041ae66
add esp, 0xc
mov eax, dword [ebp - 0x40]
mov dword [ebp - 4], ebx
xor esi, esi
cmp dword [ebp - 0x3c], 0x10
mov ecx, dword [ebp - 0x50]
jae 0x41b16b
lea ecx, [ebp - 0x50]
push ebx
sub eax, esi
push eax
add ecx, esi
push ecx
push edi
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
je 0x41b428
add esi, eax
cmp dword [ebp - 0x1f8], ebx
je 0x41b1a0
push ebx
push dword [ebp - 0x1f8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x41b44a
mov eax, dword [ebp - 0x40]
cmp esi, eax
jb 0x41b15f
xor esi, esi
push ebx
push 0x18
pop eax
sub eax, esi
push eax
lea eax, [ebp + esi - 0x28]
push eax
push edi
call sub.WS2_32.dll_recv
cmp eax, 0xffffffff
je 0x41b428
cmp eax, ebx
je 0x41b43a
add esi, eax
cmp dword [ebp - 0x1f8], ebx
je 0x41b1eb
push ebx
push dword [ebp - 0x1f8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x41b44a
cmp esi, 0x18
jb 0x41b1a9
lea ecx, [ebp - 0x1e8]
call fcn.00402730
push str.nMagicNum
lea eax, [ebp - 0x1ec]
push eax
lea ecx, [ebp - 0x1e8]
mov byte [ebp - 4], 1
mov dword [ebp - 0x1f0], ebx
call fcn.00412451
lea ecx, [ebp - 0x1f0]
push ecx
mov ecx, eax
mov byte [ebp - 4], 2
call fcn.0040b6ce
mov eax, dword [ebp - 0x1ec]
cmp eax, ebx
mov byte [ebp - 4], 1
je 0x41b242
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push str.nVersion
lea eax, [ebp - 0x1f0]
push eax
lea ecx, [ebp - 0x1e8]
mov dword [ebp - 0x1ec], ebx
call fcn.00412451
lea ecx, [ebp - 0x1ec]
push ecx
mov ecx, eax
mov byte [ebp - 4], 3
call fcn.0040b6ce
mov eax, dword [ebp - 0x1f0]
cmp eax, ebx
mov byte [ebp - 4], 1
je 0x41b285
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov esi, str.nBodyLen
push esi
lea eax, [ebp - 0x1f0]
push eax
lea ecx, [ebp - 0x1e8]
mov dword [ebp - 0x1ec], ebx
call fcn.00412451
lea ecx, [ebp - 0x1ec]
push ecx
mov ecx, eax
mov byte [ebp - 4], 4
call fcn.0040b6ce
mov eax, dword [ebp - 0x1f0]
cmp eax, ebx
mov byte [ebp - 4], 1
je 0x41b2c9
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push str.nComid
lea eax, [ebp - 0x1f0]
push eax
lea ecx, [ebp - 0x1e8]
mov dword [ebp - 0x1ec], ebx
call fcn.00412451
lea ecx, [ebp - 0x1ec]
push ecx
mov ecx, eax
mov byte [ebp - 4], 5
call fcn.0040b6ce
mov eax, dword [ebp - 0x1f0]
cmp eax, ebx
mov byte [ebp - 4], 1
je 0x41b30c
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push str.nFuture1
lea eax, [ebp - 0x1f0]
push eax
lea ecx, [ebp - 0x1e8]
mov dword [ebp - 0x1ec], ebx
call fcn.00412451
lea ecx, [ebp - 0x1ec]
push ecx
mov ecx, eax
mov byte [ebp - 4], 6
call fcn.0040b6ce
mov eax, dword [ebp - 0x1f0]
cmp eax, ebx
mov byte [ebp - 4], 1
je 0x41b34f
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push str.nFuture2
lea eax, [ebp - 0x1f0]
push eax
lea ecx, [ebp - 0x1e8]
mov dword [ebp - 0x1ec], ebx
call fcn.00412451
lea ecx, [ebp - 0x1ec]
push ecx
mov ecx, eax
mov byte [ebp - 4], 7
call fcn.0040b6ce
mov eax, dword [ebp - 0x1f0]
cmp eax, ebx
mov byte [ebp - 4], 1
je 0x41b392
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push ebx
lea ecx, [ebp - 0x1e8]
call fcn.00411e1e
push 1
push 5
lea ecx, [ebp - 0x1e8]
call fcn.00411ddb
push 1
push 0x18
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x28c]
call fcn.0041adb5
lea eax, [ebp - 0x28c]
push eax
lea ecx, [ebp - 0x1e8]
mov byte [ebp - 4], 8
call fcn.004127bb
mov edi, eax
cmp edi, ebx
je 0x41b45a
push dword [ebp - 0x1f4]
call sub.WS2_32.dll_closesocket
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP71.dll_public_virtual:_void___thiscall_std::istrstream::destructor_void_]
mov eax, dword [sym.imp.MSVCP71.dll_const_std::basic_ios_char__struct_std::char_traits_char__::vftable]
lea ecx, [ebp - 0x230]
mov dword [ebp - 0x230], eax
call dword [sym.imp.MSVCP71.dll_public_virtual:_void___thiscall_std::ios_base::destructor_void_]
mov eax, dword [ebp - 0x1e8]
cmp eax, ebx
mov byte [ebp - 4], bl
je 0x41b421
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ebx, edi
jmp 0x41b690
call sub.WS2_32.dll_WSAGetLastError
push edi
mov ebx, eax
call sub.WS2_32.dll_closesocket
jmp 0x41b690
push edi
call sub.WS2_32.dll_closesocket
mov ebx, 0x18cba81
jmp 0x41b690
push edi
call sub.WS2_32.dll_closesocket
mov ebx, 0x3e3
jmp 0x41b690
push esi
lea eax, [ebp - 0x1ec]
push eax
lea ecx, [ebp - 0x1e8]
call fcn.00412451
mov ecx, eax
mov byte [ebp - 4], 9
call fcn.00412010
mov edi, eax
mov eax, dword [ebp - 0x1ec]
cmp eax, ebx
mov byte [ebp - 4], 8
je 0x41b48e
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
cmp edi, ebx
je 0x41b646
cmp edi, 0xa00000
ja 0x41b646
mov esi, dword [ebp - 0x1fc]
push edi
mov ecx, esi
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::resize_unsigned_int_]
cmp dword [esi + 0x14], edi
je 0x41b505
push dword [ebp - 0x1f4]
call sub.WS2_32.dll_closesocket
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP71.dll_public_virtual:_void___thiscall_std::istrstream::destructor_void_]
mov eax, dword [sym.imp.MSVCP71.dll_const_std::basic_ios_char__struct_std::char_traits_char__::vftable]
lea ecx, [ebp - 0x230]
mov dword [ebp - 0x230], eax
call dword [sym.imp.MSVCP71.dll_public_virtual:_void___thiscall_std::ios_base::destructor_void_]
mov eax, dword [ebp - 0x1e8]
cmp eax, ebx
mov byte [ebp - 4], bl
je 0x41b4fb
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ebx, 0x132b3a9
jmp 0x41b690
xor esi, esi
mov eax, dword [ebp - 0x1fc]
cmp dword [eax + 0x18], 0x10
jb 0x41b518
mov eax, dword [eax + 4]
jmp 0x41b51b
add eax, 4
push ebx
mov ecx, edi
sub ecx, esi
push ecx
add eax, esi
push eax
push dword [ebp - 0x1f4]
call sub.WS2_32.dll_recv
cmp eax, 0xffffffff
je 0x41b5a5
add esi, eax
cmp dword [ebp - 0x1f8], ebx
je 0x41b553
push ebx
push dword [ebp - 0x1f8]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x41b5f8
cmp esi, edi
jb 0x41b507
push dword [ebp - 0x1f4]
call sub.WS2_32.dll_closesocket
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP71.dll_public_virtual:_void___thiscall_std::istrstream::destructor_void_]
mov eax, dword [sym.imp.MSVCP71.dll_const_std::basic_ios_char__struct_std::char_traits_char__::vftable]
lea ecx, [ebp - 0x230]
mov dword [ebp - 0x230], eax
call dword [sym.imp.MSVCP71.dll_public_virtual:_void___thiscall_std::ios_base::destructor_void_]
mov eax, dword [ebp - 0x1e8]
cmp eax, ebx
mov byte [ebp - 4], bl
je 0x41b690
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x41b690
call sub.WS2_32.dll_WSAGetLastError
push dword [ebp - 0x1f4]
mov esi, eax
call sub.WS2_32.dll_closesocket
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP71.dll_public_virtual:_void___thiscall_std::istrstream::destructor_void_]
mov eax, dword [sym.imp.MSVCP71.dll_const_std::basic_ios_char__struct_std::char_traits_char__::vftable]
lea ecx, [ebp - 0x230]
mov dword [ebp - 0x230], eax
call dword [sym.imp.MSVCP71.dll_public_virtual:_void___thiscall_std::ios_base::destructor_void_]
mov eax, dword [ebp - 0x1e8]
cmp eax, ebx
mov byte [ebp - 4], bl
je 0x41b5f1
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ebx, esi
jmp 0x41b690
push dword [ebp - 0x1f4]
call sub.WS2_32.dll_closesocket
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP71.dll_public_virtual:_void___thiscall_std::istrstream::destructor_void_]
mov eax, dword [sym.imp.MSVCP71.dll_const_std::basic_ios_char__struct_std::char_traits_char__::vftable]
lea ecx, [ebp - 0x230]
mov dword [ebp - 0x230], eax
call dword [sym.imp.MSVCP71.dll_public_virtual:_void___thiscall_std::ios_base::destructor_void_]
mov eax, dword [ebp - 0x1e8]
cmp eax, ebx
mov byte [ebp - 4], bl
je 0x41b450
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x41b450
push dword [ebp - 0x1f4]
call sub.WS2_32.dll_closesocket
lea ecx, [ebp - 0x230]
mov byte [ebp - 4], 1
call dword [sym.imp.MSVCP71.dll_public_virtual:_void___thiscall_std::istrstream::destructor_void_]
mov eax, dword [sym.imp.MSVCP71.dll_const_std::basic_ios_char__struct_std::char_traits_char__::vftable]
lea ecx, [ebp - 0x230]
mov dword [ebp - 0x230], eax
call dword [sym.imp.MSVCP71.dll_public_virtual:_void___thiscall_std::ios_base::destructor_void_]
mov eax, dword [ebp - 0x1e8]
cmp eax, ebx
mov byte [ebp - 4], bl
je 0x41b68b
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ebx, 0x17d7855
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x54]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop esi
xor ecx, ebp
pop ebx
call fcn.0041ef93
leave
ret