Function at 0x405216
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push esi
push edi
push 0x4947c8
push 0x202
mov edi, ecx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x405256
xor esi, esi
push esi
push 0x490b88
push 0x481060
push esi
call dword [sym.imp.USER32.dll_MessageBoxW]
call dword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x4054e3
push 6
push 1
push 2
pop esi
push esi
call dword [sym.imp.WS2_32.dll_socket]
mov dword [0x4930d4], eax
cmp eax, 0xffffffff
jne 0x40527d
push 0
push 0x490b88
push 0x4810a8
push edi
jmp 0x405245
push str.skylon.ucoz.net
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [0x494ae0], eax
test eax, eax
jne 0x40529e
push eax
push 0x4810d4
push 0x481110
jmp 0x40527a
mov word [0x49495c], si
mov eax, dword [eax + 0xc]
push 0x50
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [0x494960], eax
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
push 0x49495c
push dword [0x4930d4]
mov word [0x49495e], ax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4052e5
push 0
push 0x4810d4
push 0x481154
jmp 0x40527a
lea eax, [ebp - 4]
push eax
call fcn.0045cd64
push dword [ebp - 4]
lea eax, [ebp - 0x104]
push str.GET__Latest_version_of_Diary_Manager.txt__u_HTTP_1.0_r_nHOST:_skylon.ucoz.net_r_n_r_n
push eax
call fcn.004010b6
lea ecx, [ebp - 0x104]
add esp, 0x10
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40530e
xor esi, esi
lea eax, [ebp - 0x104]
push esi
sub ecx, edx
push ecx
push eax
push dword [0x4930d4]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x405343
push esi
push 0x4810d4
push 0x4811c8
jmp 0x40527a
push ebx
push esi
push 0x1000
mov ebx, esi
push 0x4931b8
jmp 0x405376
cmp eax, 0xffffffff
je 0x4054a9
test eax, eax
je 0x4054a9
add ebx, eax
mov eax, 0x1000
push esi
sub eax, ebx
push eax
lea eax, [ebx + 0x4931b8]
push eax
push dword [0x4930d4]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x405353
push dword [0x4930d4]
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, esi
mov eax, esi
cmp byte [eax + 0x4931b8], 0x4c
jne 0x40548c
cmp byte [eax + 0x4931b9], 0x61
jne 0x40548c
cmp byte [eax + 0x4931ba], 0x74
jne 0x40548c
cmp byte [eax + 0x4931bb], 0x65
jne 0x40548c
cmp byte [eax + 0x4931bc], 0x73
jne 0x40548c
cmp byte [eax + 0x4931bd], 0x74
jne 0x40548c
cmp byte [eax + 0x4931be], 0x20
jne 0x40548c
cmp byte [eax + 0x4931bf], 0x76
jne 0x40548c
cmp byte [eax + 0x4931c0], 0x65
jne 0x40548c
cmp byte [eax + 0x4931c1], 0x72
jne 0x40548c
cmp byte [eax + 0x4931c2], 0x73
jne 0x40548c
cmp byte [eax + 0x4931c3], 0x69
jne 0x40548c
cmp byte [eax + 0x4931c4], 0x6f
jne 0x40548c
cmp byte [eax + 0x4931c5], 0x6e
jne 0x40548c
cmp byte [eax + 0x4931c6], 0x3a
jne 0x40548c
cmp byte [eax + 0x4931c7], 0x20
jne 0x40548c
cmp byte [eax + 0x4931c8], 0x31
jne 0x405489
cmp byte [eax + 0x4931c9], 0x2e
jne 0x405489
cmp byte [eax + 0x4931ca], 0x30
jne 0x405489
cmp byte [eax + 0x4931cb], 0x2e
jne 0x405489
cmp byte [eax + 0x4931cc], 0x38
jne 0x405489
cmp byte [eax + 0x4931cd], 0x2e
jne 0x405489
cmp byte [eax + 0x4931ce], 0x35
je 0x4054c3
xor ecx, ecx
inc ecx
inc eax
cmp eax, 0xfea
jb 0x405396
cmp ecx, 1
jne 0x4054d0
xor edx, edx
mov ecx, edi
inc edx
call fcn.004054e7
jmp 0x4054e2
push esi
push 0x4810d4
push 0x4811e8
push esi
call dword [sym.imp.USER32.dll_MessageBoxW]
call dword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x4054e2
push esi
push 0x481218
push 0x481258
jmp 0x4054db
push esi
push 0x481218
push 0x4812b8
push edi
call dword [sym.imp.USER32.dll_MessageBoxW]
pop ebx
pop edi
pop esi
leave
ret