Function at 0x407860
Capabilities:
Check if file exists
Initialize winsock library
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x534e8c
mov eax, dword fs:[0]
push eax
sub esp, 0x808
mov eax, dword [0x58c758]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x800], ecx
mov eax, 0x202
mov word [ebp - 0x5b8], ax
lea ecx, [ebp - 0x1a4]
push ecx
movzx edx, word [ebp - 0x5b8]
push edx
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp - 0x5c4], eax
cmp dword [ebp - 0x5c4], 0
je 0x4078c6
jmp 0x407be3
push 0x540e68
lea eax, [ebp - 0x5bc]
push eax
call fcn.0041acc0
add esp, 8
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x5bc]
call fcn.0043e290
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x407914
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x5bc]
call fcn.00401eb0
jmp 0x407be3
xor ecx, ecx
mov word [ebp - 0x3ac], cx
push 0x206
push 0
lea edx, [ebp - 0x3aa]
push edx
call fcn.004b0ac0
add esp, 0xc
xor eax, eax
mov word [ebp - 0x5b4], ax
push 0x206
push 0
lea ecx, [ebp - 0x5b2]
push ecx
call fcn.004b0ac0
add esp, 0xc
lea ecx, [ebp - 0x5bc]
call fcn.0043e290
push eax
push 0
push str.port
push str.proxy
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x5c8], eax
lea ecx, [ebp - 0x5bc]
call fcn.0043e290
push eax
push 0x103
lea edx, [ebp - 0x5b4]
push edx
push 0x540868
push 0x540e40
push str.proxy
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push str.360EntClient_update.ini
lea eax, [ebp - 0x5c0]
push eax
call fcn.0041acc0
add esp, 8
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x5c0]
call fcn.0043e290
push eax
push 0x103
lea ecx, [ebp - 0x3ac]
push ecx
push 0x540868
push str.hostname
push str.360safe
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push 3
mov edx, dword [ebp - 0x5c8]
push edx
lea eax, [ebp - 0x5b4]
push eax
lea ecx, [ebp - 0x670]
call fcn.004087b0
mov dword [ebp - 0x804], eax
mov ecx, dword [ebp - 0x804]
mov dword [ebp - 0x808], ecx
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x808]
call fcn.0043e290
push eax
mov ecx, dword [ebp - 0x800]
call fcn.00407460
neg eax
sbb eax, eax
add eax, 1
mov byte [ebp - 0x5e9], al
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x670]
call fcn.004087e0
movzx edx, byte [ebp - 0x5e9]
test edx, edx
je 0x407bbc
cmp dword [0x58fb50], 0
je 0x407a7d
lea eax, [ebp - 0x5b4]
push eax
push 0x540da8
push 0x58f750
call fcn.004045b0
add esp, 0xc
mov byte [ebp - 0x5e8], 0
xor ecx, ecx
mov dword [ebp - 0x5e7], ecx
mov dword [ebp - 0x5e3], ecx
mov dword [ebp - 0x5df], ecx
mov dword [ebp - 0x5db], ecx
mov dword [ebp - 0x5d7], ecx
mov dword [ebp - 0x5d3], ecx
mov dword [ebp - 0x5cf], ecx
mov word [ebp - 0x5cb], cx
mov byte [ebp - 0x5c9], cl
push 0x20
lea edx, [ebp - 0x5e8]
push edx
mov eax, dword [ebp - 0x5c8]
push eax
lea ecx, [ebp - 0x3ac]
push ecx
lea ecx, [ebp - 0x6f8]
call fcn.004087b0
mov dword [ebp - 0x80c], eax
mov edx, dword [ebp - 0x80c]
mov dword [ebp - 0x810], edx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x810]
call fcn.0043e290
push eax
mov ecx, dword [ebp - 0x800]
call fcn.00407740
mov dword [ebp - 0x674], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x6f8]
call fcn.004087e0
cmp dword [ebp - 0x674], 0
je 0x407bbc
lea eax, [ebp - 0x5e8]
push eax
lea ecx, [ebp - 0x7fc]
call fcn.00408810
mov dword [ebp - 0x814], eax
mov ecx, dword [ebp - 0x814]
call fcn.0043e290
push eax
lea ecx, [ebp - 0x5b4]
push ecx
call fcn.004b1f36
add esp, 8
lea ecx, [ebp - 0x7fc]
call fcn.004087e0
lea ecx, [ebp - 0x5bc]
call fcn.0043e290
push eax
lea edx, [ebp - 0x5b4]
push edx
push 0x540e40
push str.proxy
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push 0x58f6e8
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
cmp dword [0x58fb50], 0
je 0x407bbc
lea eax, [ebp - 0x5b4]
push eax
push str.9hnc
push 0x58f750
call fcn.004045b0
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x5c0]
call fcn.00401eb0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x5bc]
call fcn.00401eb0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004b0a79
mov esp, ebp
pop ebp
ret