Function at 0x45b590
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Resolve function by parsing pe exports
Send data
Send data on socket

Disassembly:
sub esp, 0x1bc
push ebx
push ebp
push esi
mov ebx, ecx
push edi
mov edi, 0x476804
or ecx, 0xffffffff
xor eax, eax
mov dword [ebx + 0xe0], 0
mov ebp, dword [esp + 0x1d0]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov dword [esp + 0x18], ecx
push ecx
mov ecx, ebp
mov dword [esp + 0x30], ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x45b5f8
mov eax, dword [esp + 0x14]
mov edi, dword [ebp + 4]
mov ecx, eax
mov esi, 0x476804
mov edx, ecx
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
mov ecx, ebx
call fcn.00459b40
lea eax, [esp + 0x3c]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x18], esi
jne 0x45b638
pop edi
pop esi
pop ebp
mov eax, 0xffffff9c
pop ebx
add esp, 0x1bc
ret 4
push 0x50
mov word [esp + 0x30], 2
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x2e], ax
mov eax, dword [ebx + 0x3c]
test eax, eax
jne 0x45b658
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x45b675
pop edi
pop esi
pop ebp
mov eax, 0xffffff99
pop ebx
add esp, 0x1bc
ret 4
mov ecx, dword [eax + 0xc]
push 0x10
mov edx, dword [ecx]
lea ecx, [esp + 0x30]
push ecx
push esi
mov eax, dword [edx]
mov dword [esp + 0x3c], eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x45b6a5
pop edi
pop esi
pop ebp
mov eax, 0xffffff9b
pop ebx
add esp, 0x1bc
ret 4
mov eax, dword [ebx + 0x80]
mov ecx, dword [ebx + 0x84]
test eax, eax
mov dword [esp + 0x20], 0
jne 0x45b6c2
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov edx, dword [esp + 0x18]
mov edi, dword [sym.imp.WS2_32.dll_send]
push 0
push ecx
push eax
push edx
call edi
mov esi, dword [sym.imp.MSVCP60.dll_bool___cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__]
lea eax, [ebx + 0x48]
push 0x4766bc
push eax
call esi
add esp, 8
test al, al
je 0x45b88a
lea ecx, [ebx + 0x58]
push 0x472480
push ecx
call esi
add esp, 8
test al, al
je 0x45b851
mov eax, dword [ebx + 0xb0]
mov ecx, dword [ebx + 0xb4]
cmp eax, ecx
mov dword [esp + 0x1c], eax
je 0x45b7a6
mov eax, dword [ebx + 0xe0]
test eax, eax
jne 0x45b7ea
mov edx, dword [esp + 0x1c]
push 0
mov esi, dword [edx]
mov edx, dword [esp + 0x1c]
mov eax, dword [esi + 4]
mov ecx, dword [esi]
push eax
push ecx
push edx
call edi
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x20]
add ecx, eax
mov dword [esp + 0x20], ecx
mov ecx, dword [ebx + 0x1c]
test ecx, ecx
je 0x45b77c
mov edx, dword [ebx + 0x20]
mov eax, dword [ebx + 0x24]
sub eax, edx
xor edx, edx
imul eax, dword [esp + 0x20]
div dword [ebx + 0x78]
mov edx, dword [ebx + 0x20]
add eax, edx
mov edx, dword [ebx + 0x14]
push eax
mov eax, dword [ebx + 0x18]
push edx
push ecx
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
mov ecx, dword [esi]
push ecx
call sub.MFC42.DLL_operatordelete
push esi
call sub.MFC42.DLL_operatordelete
mov eax, dword [esp + 0x24]
mov ecx, dword [ebx + 0xb4]
add eax, 4
add esp, 8
cmp eax, ecx
mov dword [esp + 0x1c], eax
jne 0x45b71d
mov ecx, dword [ebx + 0xb4]
lea esi, [ebx + 0xac]
mov eax, ecx
mov ebx, dword [esi + 4]
cmp eax, ecx
je 0x45b7c9
mov edx, dword [eax]
add eax, 4
mov dword [ebx], edx
add ebx, 4
cmp eax, ecx
jne 0x45b7bb
mov eax, dword [esi + 8]
mov ecx, esi
push eax
push ebx
call fcn.00417b30
push 0
mov dword [esi + 8], ebx
mov esi, dword [esp + 0x1c]
push 2
push 0x46f35c
jmp 0x45b87b
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov edi, 0x476804
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [ebx + 0x7c]
mov ebp, ecx
mov ecx, edi
push ebp
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x45b83b
mov edi, dword [edi + 4]
mov ecx, ebp
mov edx, ecx
mov esi, 0x476804
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 0x80]
mov dword [ebx + 0x84], ebp
mov byte [eax + ebp], 0
pop edi
pop esi
mov dword [ebx + 0x78], 0
pop ebp
xor eax, eax
pop ebx
add esp, 0x1bc
ret 4
mov esi, dword [esp + 0x18]
push 0
push 2
push 0x46f35c
push esi
call edi
mov eax, dword [ebx + 0xd8]
mov ebx, dword [ebx + 0xd4]
test ebx, ebx
jne 0x45b877
mov ebx, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push 0
push eax
push ebx
push esi
call edi
push 0
push 2
push 0x46f35c
push esi
call edi
mov edi, 0x476804
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x15], 1
mov ebx, ecx
mov ecx, ebp
push ebx
mov byte [esp + 0x1b], 0
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x45b8d6
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
mov esi, 0x476804
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [eax + ebx], 0
mov edx, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x16]
push 1
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jge 0x45b8f3
mov byte [esp + 0x11], 0
mov al, byte [esp + 0x12]
cmp al, 0xa
jne 0x45b9b3
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x45b90c
mov byte [esp + 0x11], 0
mov edi, 0x46f1dc
or ecx, 0xffffffff
xor eax, eax
mov dword [esp + 0x1c], 0
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x20], ecx
je 0x45b99d
mov ebx, dword [ebp + 8]
test ebx, ebx
jbe 0x45b996
mov eax, dword [esp + 0x20]
cmp eax, ebx
ja 0x45b996
movsx edx, byte [0x46f1dc]
mov ecx, 1
sub ecx, eax
mov eax, dword [ebp + 4]
add ebx, ecx
mov dword [esp + 0x14], eax
push ebx
push edx
push eax
call dword [sym.imp.MSVCRT.dll_memchr]
add esp, 0xc
test eax, eax
je 0x45b996
mov ecx, dword [esp + 0x20]
mov edi, 0x46f1dc
mov esi, eax
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x45b9ae
mov ecx, dword [esp + 0x14]
movsx edx, byte [0x46f1dc]
sub ecx, eax
inc eax
mov dword [esp + 0x14], eax
lea ebx, [ebx + ecx - 1]
push ebx
push edx
push eax
call dword [sym.imp.MSVCRT.dll_memchr]
add esp, 0xc
test eax, eax
jne 0x45b95f
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov eax, dword [eax]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
cmp eax, dword [ecx]
je 0x45b9bb
mov byte [esp + 0x13], 1
jmp 0x45b9bb
sub eax, dword [ebp + 4]
jmp 0x45b99d
cmp al, 0xd
je 0x45b9bb
inc dword [esp + 0x1c]
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov bl, byte [esp + 0x12]
mov eax, dword [edx]
mov edx, dword [ebp + 8]
sub eax, edx
cmp eax, 1
ja 0x45b9d7
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov edi, dword [ebp + 8]
push 0
inc edi
mov ecx, ebp
push edi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x45ba03
mov edx, dword [ebp + 4]
mov eax, dword [ebp + 8]
movsx ecx, bl
add edx, eax
mov ch, cl
mov byte [edx], cl
mov ecx, dword [ebp + 4]
mov dword [ebp + 8], edi
mov byte [ecx + edi], 0
mov al, byte [esp + 0x11]
test al, al
jne 0x45b8d6
mov edi, 0x476804
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x28], 0
mov ebx, ecx
mov ecx, ebp
push ebx
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x45ba59
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
mov esi, 0x476804
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov dword [ebp + 8], ebx
mov byte [eax + ebx], 0
mov al, byte [esp + 0x13]
test al, al
je 0x45bcc7
mov esi, dword [sym.imp.WS2_32.dll_recv]
mov byte [esp + 0x11], 1
mov edx, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x16]
push 1
push ecx
push edx
call esi
test eax, eax
jge 0x45ba89
mov byte [esp + 0x11], 0
mov al, byte [esp + 0x12]
cmp al, 0xd
je 0x45bada
cmp al, 0xa
je 0x45bae2
mov edx, dword [ebp + 8]
mov bl, al
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov ecx, dword [eax]
sub ecx, edx
cmp ecx, 1
ja 0x45baae
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov edi, dword [ebp + 8]
push 0
inc edi
mov ecx, ebp
push edi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x45bada
mov eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
movsx edx, bl
add eax, ecx
mov dh, dl
mov byte [eax], dl
mov edx, dword [ebp + 4]
mov dword [ebp + 8], edi
mov byte [edx + edi], 0
mov al, byte [esp + 0x11]
test al, al
jne 0x45ba70
mov eax, dword [ebp + 4]
test eax, eax
jne 0x45baee
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
lea ecx, [esp + 0x24]
push ecx
push 0x46f160
push eax
call dword [sym.imp.MSVCRT.dll_sscanf]
mov edx, dword [esp + 0x30]
inc edx
push edx
call sub.MFC42.DLL_operatornew
mov esi, eax
mov eax, dword [esp + 0x34]
mov edi, esi
add esp, 0x10
lea ecx, [eax + 1]
xor eax, eax
mov edx, ecx
push 0
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [esp + 0x18], esi
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x1c]
push eax
push esi
push ecx
call dword [sym.imp.WS2_32.dll_recv]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::max_size_void_const]
cmp eax, ebx
jae 0x45bb5f
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [ebp + 4]
test ecx, ecx
je 0x45bb85
mov al, byte [ecx - 1]
test al, al
je 0x45bb85
cmp al, 0xff
je 0x45bb85
test ebx, ebx
jne 0x45bbab
dec al
push ebx
mov byte [ecx - 1], al
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x45bbd9
test ebx, ebx
jne 0x45bb95
push 1
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
jmp 0x45bbd9
mov eax, dword [ebp + 0xc]
cmp eax, 0x1f
ja 0x45bba1
cmp eax, ebx
jae 0x45bbb4
push 1
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push ebx
mov ecx, ebp
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Copy_unsigned_int_]
mov esi, dword [esp + 0x14]
mov edi, dword [ebp + 4]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 4]
mov esi, dword [esp + 0x14]
mov dword [ebp + 8], ebx
mov byte [eax + ebx], 0
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov edi, 0x476804
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
cmp ebp, 0xfffffffd
jbe 0x45bc04
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
mov ecx, dword [esp + 0x28]
lea ebx, [ecx + 0x7c]
mov ecx, dword [ecx + 0x80]
test ecx, ecx
je 0x45bc48
mov al, byte [ecx - 1]
test al, al
je 0x45bc48
cmp al, 0xff
je 0x45bc48
test ebp, ebp
jne 0x45bc82
dec al
push ebp
mov byte [ecx - 1], al
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov ecx, dword [esp + 0x28]
pop edi
pop esi
xor eax, eax
mov dword [ecx + 0x78], ebp
pop ebp
pop ebx
add esp, 0x1bc
ret 4
test ebp, ebp
jne 0x45bc6c
push 1
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov ecx, dword [esp + 0x28]
pop edi
pop esi
xor eax, eax
mov dword [ecx + 0x78], ebp
pop ebp
pop ebx
add esp, 0x1bc
ret 4
mov eax, dword [ebx + 0xc]
cmp eax, 0x1f
ja 0x45bc78
cmp eax, ebp
jae 0x45bc8b
push 1
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push ebp
mov ecx, ebx
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Copy_unsigned_int_]
mov edi, dword [ebx + 4]
mov ecx, ebp
mov edx, ecx
mov esi, 0x476804
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x28]
mov dword [ebx + 8], ebp
pop edi
mov byte [eax + ebp], 0
pop esi
pop ebp
mov dword [ecx + 0x78], 0
xor eax, eax
pop ebx
add esp, 0x1bc
ret 4
pop edi
pop esi
pop ebp
mov eax, 0xffffff9a
pop ebx
add esp, 0x1bc
ret 4