Function at 0x406910
Capabilities:
Create tcp socket
Create udp socket
Get hostname
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41a426
mov eax, dword fs:[0]
push eax
sub esp, 0x248
mov eax, dword [0x42500c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x254], edi
lea eax, [ebp - 0x250]
push eax
push 0x102
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.WSAStartup_0:successful_:
push 0x40a8e0
push eax
call fcn.0040a6a0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push 0x80
lea eax, [ebp - 0x90]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x90]
push 0x80
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
jne 0x406c76
lea eax, [ebp - 0x90]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov ebx, eax
test ebx, ebx
je 0x406c6f
mov dword [ebp - 0x94], 0xf
mov dword [ebp - 0x98], 0
mov byte [ebp - 0xa8], 0
mov dword [ebp - 4], 0
xor esi, esi
mov eax, dword [ebx + 0xc]
cmp dword [eax], esi
je 0x406ae2
xor ecx, ecx
nop word [eax + eax]
mov eax, dword [ecx + eax]
push dword [eax]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edx, eax
mov dword [ebp - 0xac], 0xf
mov dword [ebp - 0xb0], 0
mov byte [ebp - 0xc0], 0
cmp byte [edx], 0
jne 0x406a31
xor ecx, ecx
jmp 0x406a3f
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406a36
sub ecx, edi
push ecx
push edx
lea ecx, [ebp - 0xc0]
call fcn.004098a0
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0xc0]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0xa8]
call fcn.00409c90
push 1
push 0x41f25c
lea ecx, [ebp - 0xa8]
call fcn.00409b70
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x40a8e0
push esi
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___int_]
mov edx, 0x41f260
mov ecx, eax
call fcn.0040a6a0
lea edx, [ebp - 0xc0]
mov ecx, eax
call fcn.0040a910
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0xac]
cmp eax, 0x10
jb 0x406ac7
inc eax
push eax
push dword [ebp - 0xc0]
call fcn.0040a320
mov eax, dword [ebx + 0xc]
inc esi
lea ecx, [esi*4]
cmp dword [ecx + eax], 0
jne 0x406a00
mov edi, dword [ebp - 0x254]
cmp byte [ebp - 0x90], 0
jne 0x406aef
xor ecx, ecx
jmp 0x406b01
lea ecx, [ebp - 0x90]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406af8
sub ecx, edx
push ecx
lea eax, [ebp - 0x90]
push eax
lea ecx, [edi + 0xdc]
call fcn.004098a0
push 2
push 0x41f264
lea ecx, [edi + 0xdc]
call fcn.00409b70
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0xa8]
push eax
lea ecx, [edi + 0xdc]
call fcn.00409c90
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.HostName:_t
push 0x40a8e0
call fcn.0040a6a0
lea edx, [ebp - 0x90]
mov ecx, eax
call fcn.0040a6a0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.LocalHost:_t
push 0x40a8e0
call fcn.0040a6a0
lea edx, [ebp - 0xa8]
mov ecx, eax
call fcn.0040a910
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x94]
cmp eax, 0x10
jb 0x406baf
inc eax
push eax
push dword [ebp - 0xa8]
call fcn.0040a320
add edi, 4
mov dword [ebp - 0x94], 0xf
mov dword [ebp - 0x98], 0
mov byte [ebp - 0xa8], 0
cmp dword [edi + 0x14], 0x10
jb 0x406bd7
mov eax, dword [edi]
jmp 0x406bd9
mov eax, edi
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x406c02
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, edi
push 0x40a8e0
call fcn.0040a910
mov edx, 0x41f2bc
mov ecx, eax
jmp 0x406c98
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
push dword [eax]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, edi
push 0x40a8e0
mov esi, eax
call fcn.0040a910
mov edx, 0x41f2d0
mov ecx, eax
call fcn.0040a6a0
mov edx, esi
mov ecx, eax
call fcn.0040a6a0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
push esi
mov esi, dword [ebp - 0x254]
push 0x20
lea eax, [esi + 0xac]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcpy_s]
add esp, 0xc
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0xcc], eax
mov al, 1
jmp 0x406ca7
mov edx, 0x41f280
jmp 0x406c8d
push 0x11
push 0x41f294
lea ecx, [edi + 0xdc]
call fcn.004098a0
mov edx, 0x41f2a8
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
push 0x40a8e0
call fcn.0040a6a0
mov ecx, eax
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00418d36
mov esp, ebp
pop ebp
ret