Function at 0x401037
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Resolve dns

Disassembly:
jmp 0x40a720
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40e51f
push eax
mov dword fs:[0], esp
sub esp, 0xcc
push ebx
push ebp
push esi
push edi
call fcn.004010dc
xor ebp, ebp
mov ebx, 2
push ebp
push 1
push ebx
mov esi, eax
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 0x1d8], eax
jne 0x40a833
mov al, byte [esp + 0x13]
push ebp
lea ecx, [esp + 0x18]
mov byte [esp + 0x18], al
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 edi, str.Unable_to_create_socket
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Unable_to_create_socket
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
lea ecx, [esp + 0x14]
mov dword [esp + 0xe4], ebp
push ecx
lea ecx, [esp + 0x70]
call fcn.00401276
push 1
lea ecx, [esp + 0x18]
mov byte [esp + 0xe8], bl
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 edi, str.C:UsersUserDesktopVC_65.2.20WinBattle_srcWinBattle_srccommon_socket.cpp
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x74], 0x134
mov ebx, ecx
lea ecx, [esp + 0x78]
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 0x40a80e
mov edi, dword [esp + 0x78]
mov ecx, ebx
mov edx, ecx
mov esi, str.C:UsersUserDesktopVC_65.2.20WinBattle_srcWinBattle_srccommon_socket.cpp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x78]
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_]
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x34]
push eax
call fcn.004010cd
lea ecx, [esp + 0x34]
push 0x410c88
push ecx
mov dword [esp + 0x3c], 0x4101b4
call sub.MSVCRT.dll__CxxThrowException
mov edx, dword [esp + 0xec]
mov dword [esi + 0x3c], ebp
push edx
mov dword [esi + 0x40], ebp
mov byte [esi + 0x3a], 1
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edi, eax
cmp edi, ebp
jne 0x40a927
mov al, byte [esp + 0x13]
push ebp
lea ecx, [esp + 0x18]
mov byte [esp + 0x18], al
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 edi, str.Cannot_find_remote_host
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.Cannot_find_remote_host
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
lea ecx, [esp + 0x14]
mov dword [esp + 0xe4], 3
push ecx
lea ecx, [esp + 0x70]
call fcn.00401276
push 1
lea ecx, [esp + 0x18]
mov byte [esp + 0xe8], 5
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 edi, str.C:UsersUserDesktopVC_65.2.20WinBattle_srcWinBattle_srccommon_socket.cpp
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x74], 0x13f
mov ebx, ecx
lea ecx, [esp + 0x78]
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 0x40a902
mov edi, dword [esp + 0x78]
mov ecx, ebx
mov edx, ecx
mov esi, str.C:UsersUserDesktopVC_65.2.20WinBattle_srcWinBattle_srccommon_socket.cpp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x78]
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_]
lea eax, [esp + 0x6c]
lea ecx, [esp + 0x34]
push eax
call fcn.004010cd
lea ecx, [esp + 0x34]
push 0x410c88
push ecx
mov dword [esp + 0x3c], 0x4101b4
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [esp + 0xf0]
xor edx, edx
mov dword [esp + 0x24], edx
push eax
mov dword [esp + 0x2c], edx
mov word [esp + 0x28], bx
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x26], ax
mov ecx, dword [edi + 0xc]
push 0x10
mov edx, dword [ecx]
lea ecx, [esp + 0x28]
push ecx
mov eax, dword [edx]
mov dword [esp + 0x30], eax
mov edx, dword [esi + 0x1d8]
push edx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40aa7c
mov al, byte [esp + 0x13]
push ebp
lea ecx, [esp + 0x18]
mov byte [esp + 0x18], al
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 edi, str.Unable_to_make_connection_to_remote_system
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x18]
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 0x40a9d2
mov edi, dword [esp + 0x18]
mov ecx, ebp
mov edx, ecx
mov esi, str.Unable_to_make_connection_to_remote_system
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
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_]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x34]
push eax
mov dword [esp + 0xe8], 6
call fcn.00401276
push 1
lea ecx, [esp + 0x18]
mov byte [esp + 0xe8], 8
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 edi, str.C:UsersUserDesktopVC_65.2.20WinBattle_srcWinBattle_srccommon_socket.cpp
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x3c], 0x150
mov ebp, ecx
lea ecx, [esp + 0x40]
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 0x40aa4e
mov edi, dword [esp + 0x40]
mov ecx, ebp
mov edx, ecx
mov esi, str.C:UsersUserDesktopVC_65.2.20WinBattle_srcWinBattle_srccommon_socket.cpp
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 [esp + 0x40]
mov dword [esp + 0x44], ebp
mov byte [eax + ebp], 0
lea ecx, [esp + 0x34]
push ecx
lea ecx, [esp + 0xa8]
call fcn.004010cd
lea edx, [esp + 0xa4]
push 0x410c88
push edx
mov dword [esp + 0xac], 0x4101b4
call sub.MSVCRT.dll__CxxThrowException
mov ecx, dword [esp + 0xdc]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xd8
ret 8