Function at 0x415fc0
Capabilities:
Connect to http server
Create http request
Download and write a file
Print debug messages
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x50f3e6
mov eax, dword fs:[0]
push eax
sub esp, 0x1a4
mov eax, dword [0x551bd0]
xor eax, esp
mov dword [esp + 0x1a0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x551bd0]
xor eax, esp
push eax
lea eax, [esp + 0x1b8]
mov dword fs:[0], eax
mov eax, dword [esp + 0x1c8]
mov esi, dword [esp + 0x1cc]
xor ebx, ebx
mov dword [esp + 0x20], ecx
mov edi, 7
xor ecx, ecx
mov dword [esp + 0x24], edx
mov byte [esp + 0x16], bl
mov byte [esp + 0x17], bl
mov dword [esp + 0x70], edi
mov dword [esp + 0x6c], ebx
mov word [esp + 0x5c], cx
mov dword [esp + 0x1c0], ebx
xor edx, edx
mov dword [esp + 0x54], edi
mov dword [esp + 0x50], ebx
mov word [esp + 0x40], dx
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x5c]
push edx
push eax
lea ecx, [esp + 0x23]
mov byte [esp + 0x1cc], 1
call fcn.00415dc0
add esp, 0xc
cmp dword [esp + 0x6c], ebx
jne 0x4160ab
mov esi, 8
cmp dword [esp + 0x54], esi
jb 0x416082
mov eax, dword [esp + 0x40]
push eax
call fcn.0049a490
add esp, 4
xor ecx, ecx
mov dword [esp + 0x54], edi
mov dword [esp + 0x50], ebx
mov word [esp + 0x40], cx
cmp dword [esp + 0x70], esi
jb 0x4160a4
mov edx, dword [esp + 0x5c]
push edx
call fcn.0049a490
add esp, 4
xor al, al
jmp 0x416342
cmp esi, ebx
jne 0x4160b4
mov esi, str.P2PUpdater
push ebx
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.WININET.dll_InternetOpenA]
mov edi, eax
mov dword [esp + 0x28], edi
cmp edi, ebx
je 0x4162e0
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea eax, [esp + 0x30]
push eax
push 5
push edi
mov dword [esp + 0x3c], 0x7530
call esi
push 4
lea ecx, [esp + 0x30]
push ecx
push 6
push edi
call esi
mov eax, dword [esp + 0x5c]
mov ebp, 8
cmp dword [esp + 0x70], ebp
jae 0x416106
lea eax, [esp + 0x5c]
push ebx
push ebx
push 3
push 0x535d58
push 0x535d58
push 0x50
push eax
push edi
call dword [sym.imp.WININET.dll_InternetConnectW]
mov esi, eax
mov dword [esp + 0x18], esi
cmp esi, ebx
je 0x4162e6
mov eax, dword [esp + 0x40]
cmp dword [esp + 0x54], ebp
jae 0x41613a
lea eax, [esp + 0x40]
push ebx
push 0x84280000
push ebx
push ebx
push ebx
push eax
push 0x53900c
push esi
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov ebp, eax
cmp ebp, ebx
je 0x4162ec
push ebx
push ebx
push ebx
push ebx
push ebp
call dword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
je 0x4162d1
push 0xff
lea edx, [esp + 0xb9]
push ebx
push edx
mov byte [esp + 0xc0], bl
call fcn.0049d740
add esp, 0xc
push ebx
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0xbc]
push ecx
push 0x13
push ebp
mov dword [esp + 0x44], 0x100
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x4162d1
lea edx, [esp + 0xb4]
push edx
call fcn.0049ca34
add esp, 4
sub eax, 0xc8
je 0x4161d1
sub eax, 6
jne 0x4162d1
push ebx
lea eax, [esp + 0x3c]
push eax
lea ecx, [esp + 0x7c]
push ecx
push 5
push ebp
mov dword [esp + 0x4c], 0x40
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x416207
lea edx, [esp + 0x74]
push edx
call fcn.0049adb4
add esp, 4
mov dword [esp + 0x1d0], eax
jmp 0x416212
push str.HTTP_QUERY_CONTENT_LENGTH_Error
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x10000
mov dword [esp + 0x20], ebx
xor edi, edi
call fcn.00499a0f
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x4162c9
mov eax, dword [esp + 0x1c]
cmp eax, ebx
jbe 0x41627f
mov edx, dword [esp + 0x20]
push ebx
lea ecx, [esp + 0x38]
push ecx
push eax
push esi
push edx
mov dword [esp + 0x48], ebx
add edi, eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x41627f
push eax
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4162bc
mov eax, dword [esp + 0x1d0]
mov ecx, dword [esp + 0x1d4]
mov edx, dword [esp + 0x24]
push eax
push edi
push ecx
push edx
call dword [sym.imp.USER32.dll_PostMessageW]
push 0x10000
push ebx
push esi
call fcn.0049d740
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
push 0x10000
push esi
push ebp
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp eax, 1
sete al
mov byte [esp + 0x16], al
cmp al, bl
je 0x4162c0
mov eax, dword [esp + 0x1c]
cmp eax, ebx
jne 0x416235
jmp 0x4162c0
mov byte [esp + 0x16], bl
push esi
call fcn.0049a490
add esp, 4
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x18]
cmp ebp, ebx
je 0x4162ec
push ebp
mov ebp, dword [sym.imp.WININET.dll_InternetCloseHandle]
call ebp
jmp 0x4162f2
mov ebp, dword [esp + 0x20]
jmp 0x4162cd
mov ebp, dword [esp + 0x20]
jmp 0x4162d1
mov ebp, dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp esi, ebx
je 0x4162f9
push esi
call ebp
cmp edi, ebx
je 0x416300
push edi
call ebp
mov esi, 8
cmp dword [esp + 0x54], esi
jb 0x416318
mov ecx, dword [esp + 0x40]
push ecx
call fcn.0049a490
add esp, 4
xor edx, edx
mov dword [esp + 0x54], 7
mov dword [esp + 0x50], ebx
mov word [esp + 0x40], dx
cmp dword [esp + 0x70], esi
jb 0x41633e
mov eax, dword [esp + 0x5c]
push eax
call fcn.0049a490
add esp, 4
mov al, byte [esp + 0x16]
mov ecx, dword [esp + 0x1b8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1a0]
xor ecx, esp
call fcn.0049a49b
add esp, 0x1b0
ret