Function at 0x408e7b
Capabilities:
Check http status code
Connect to http server
Create http request
Query remote server for available data
Read data from internet
Receive data
Send data
Send http request

Disassembly:
mov eax, 0x62fe7c
call fcn.0060d220
mov eax, 0x102cc
call fcn.005bc5e0
push ebx
push esi
xor ebx, ebx
test byte [0x720084], 1
push edi
mov edi, 0x683b50
jne 0x408ec1
or dword [0x720084], 1
mov dword [ebp - 4], ebx
push edi
call fcn.005b5201
mov esi, eax
pop ecx
mov dword [0x720080], esi
or dword [ebp - 4], 0xffffffff
jmp 0x408ec7
mov esi, dword [0x720080]
mov ecx, dword [ebp + 0xc]
push esi
push ebx
push edi
call fcn.00408711
cmp eax, ebx
jl 0x408eda
add esi, eax
jmp 0x408edc
xor esi, esi
mov ecx, dword [ebp + 0xc]
push esi
push ebx
lea eax, [ebp - 0x7c]
push eax
call fcn.00401fff
mov dword [ebp - 4], 1
cmp esi, ebx
jle 0x408f6a
cmp dword [ebp - 0x64], 8
mov eax, dword [ebp - 0x78]
jae 0x408f01
lea eax, [ebp - 0x78]
push esi
mov edi, 0x683b40
push edi
push eax
call fcn.005b8781
add esp, 0xc
test eax, eax
je 0x408f6a
cmp dword [ebp + 0x10], ebx
je 0x408f4a
cmp dword [ebp - 0x64], 8
mov eax, dword [ebp - 0x78]
jae 0x408f26
lea eax, [ebp - 0x78]
push edi
push eax
push str.CHECK_PROTOCOL_ERROR
push ecx
call fcn.00402e56
pop ecx
mov esi, eax
call fcn.00405362
mov ecx, dword [ebp + 0x10]
push eax
push 2
pop esi
call fcn.00422620
add esp, 0xc
or dword [ebp - 4], 0xffffffff
push ebx
push 1
lea ecx, [ebp - 0x7c]
call fcn.0040337f
xor al, al
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
push 7
pop edi
push ebx
lea ecx, [ebp - 0x60]
mov dword [ebp - 0x48], edi
call fcn.00403466
mov byte [ebp - 4], 2
push ebx
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x24], edi
call fcn.00403466
mov byte [ebp - 4], 3
mov ecx, dword [ebp + 0xc]
push 1
push esi
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x2f
call fcn.00408711
mov ecx, dword [ebp + 0xc]
mov edi, eax
cmp edi, ebx
jle 0x408ff9
sub eax, esi
push eax
push esi
lea eax, [ebp - 0x98]
push eax
call fcn.00401fff
mov byte [ebp - 4], 4
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp - 0x60]
call fcn.00403484
mov byte [ebp - 4], 3
push ebx
push 1
lea ecx, [ebp - 0x98]
call fcn.0040337f
mov ecx, dword [ebp + 0xc]
push 0xffffffffffffffff
push edi
lea eax, [ebp - 0x98]
push eax
call fcn.00401fff
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x3c]
jmp 0x40900f
push 0xffffffffffffffff
push esi
lea eax, [ebp - 0x98]
push eax
call fcn.00401fff
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x60]
push 0xffffffffffffffff
push ebx
push eax
call fcn.00403484
mov byte [ebp - 4], 3
push ebx
push 1
lea ecx, [ebp - 0x98]
call fcn.0040337f
push ebx
push ebx
push ebx
push 1
push str.YmirPatcherv2.0.1
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x20], eax
cmp eax, ebx
jne 0x40908f
cmp dword [ebp + 0x10], ebx
je 0x40906c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.INTERNET_OPEN_ERROR
call fcn.00402e56
mov esi, eax
call fcn.00405362
mov ecx, dword [ebp + 0x10]
push eax
push 2
pop esi
call fcn.00422620
pop ecx
pop ecx
mov byte [ebp - 4], 2
push ebx
push 1
lea ecx, [ebp - 0x3c]
call fcn.0040337f
mov byte [ebp - 4], 1
push ebx
push 1
lea ecx, [ebp - 0x60]
call fcn.0040337f
jmp 0x408f4a
mov eax, dword [ebp - 0x5c]
push 8
pop edi
cmp dword [ebp - 0x48], edi
jae 0x40909d
lea eax, [ebp - 0x5c]
push ebx
push ebx
push 3
push ebx
push ebx
push 0x50
push eax
push dword [ebp - 0x20]
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x44], eax
cmp eax, ebx
jne 0x4090f5
cmp dword [ebp + 0x10], ebx
je 0x40906c
mov esi, dword [ebp - 0x5c]
cmp dword [ebp - 0x48], edi
jae 0x4090c6
lea esi, [ebp - 0x5c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.INTERNET_CONNECT_ERROR
push ecx
call fcn.00402e56
pop ecx
mov esi, eax
call fcn.00405362
mov ecx, dword [ebp + 0x10]
push eax
push 2
pop esi
call fcn.00422620
add esp, 0xc
jmp 0x40906c
mov eax, dword [ebp - 0x38]
cmp dword [ebp - 0x24], edi
jae 0x409100
lea eax, [ebp - 0x38]
push ebx
push SysReAllocString
push ebx
push ebx
push str.HTTP_1.0
push eax
push 0x683c14
push dword [ebp - 0x44]
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, eax
mov dword [ebp - 0x1c], esi
cmp esi, ebx
jne 0x409148
cmp dword [ebp + 0x10], ebx
je 0x40906c
mov esi, dword [ebp - 0x38]
cmp dword [ebp - 0x24], edi
jae 0x409139
lea esi, [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_OPEN_REQUEST_ERROR
jmp 0x4090d3
push 0x200
lea eax, [ebp - 0x2d8]
push ebx
push eax
call fcn.005b79e0
add esp, 0xc
push ebx
push ebx
push ebx
lea eax, [ebp - 0x2d8]
push eax
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x409198
cmp dword [ebp + 0x10], ebx
je 0x40906c
mov esi, dword [ebp - 0x38]
cmp dword [ebp - 0x24], edi
jae 0x409186
lea esi, [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_SEND_REQUEST_ERROR
jmp 0x4090d3
push 0x40
pop edi
push edi
lea eax, [ebp - 0xd8]
push ebx
push eax
call fcn.005b79e0
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xd8]
push eax
push 0x13
push esi
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
call esi
test eax, eax
jne 0x4091f7
cmp dword [ebp + 0x10], ebx
je 0x40906c
cmp dword [ebp - 0x24], 8
mov esi, dword [ebp - 0x38]
jae 0x4091e5
lea esi, [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_QUERY_STATUS_CODE_ERROR
jmp 0x4090d3
lea eax, [ebp - 0xd8]
push eax
call fcn.005b8827
pop ecx
cmp eax, 0xc8
je 0x40924e
cmp dword [ebp + 0x10], ebx
je 0x40906c
cmp dword [ebp - 0x24], 8
mov esi, dword [ebp - 0x38]
jae 0x409220
lea esi, [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_QUERY_STATUS_NOT_OK
call fcn.00402e56
mov esi, eax
call fcn.00405362
push eax
mov ecx, dword [ebp + 0x10]
push 2
pop esi
call fcn.00422620
add esp, 0x10
jmp 0x40906c
push edi
lea eax, [ebp - 0xd8]
push ebx
push eax
call fcn.005b79e0
add esp, 0xc
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xd8]
push eax
push 5
push dword [ebp - 0x1c]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], ebx
call esi
test eax, eax
jne 0x4092b7
cmp dword [ebp + 0x10], ebx
je 0x40906c
cmp dword [ebp - 0x24], 8
mov esi, dword [ebp - 0x38]
jae 0x409294
lea esi, [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_QUERY_CONTENT_LENGTH_ERROR
push ecx
call fcn.00402e56
pop ecx
mov esi, eax
call fcn.00405362
push eax
push str._s__path_s__error_d_
jmp 0x40923b
lea eax, [ebp - 0xd8]
push eax
call fcn.005b883d
pop ecx
mov ecx, dword [ebp + 8]
push eax
mov dword [ebp - 0x18], eax
call fcn.0040940e
push dword [ebp + 8]
call fcn.004093c8
mov esi, dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
xor edi, edi
jmp 0x409327
mov eax, 0x10000
cmp dword [ebp - 0x40], eax
jae 0x4092ef
mov eax, dword [ebp - 0x40]
lea ecx, [ebp - 0x14]
push ecx
push eax
lea eax, [ebp - 0x102d8]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x409351
cmp dword [ebp - 0x14], ebx
je 0x409336
push dword [ebp - 0x14]
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x102d8]
push eax
call fcn.0040742d
add edi, dword [ebp - 0x14]
cmp edi, dword [ebp - 0x18]
jae 0x409336
push ebx
push ebx
lea eax, [ebp - 0x40]
push eax
push dword [ebp - 0x1c]
call esi
test eax, eax
jne 0x4092e2
push dword [ebp - 0x1c]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push dword [ebp - 0x44]
call esi
push dword [ebp - 0x20]
call esi
mov byte [ebp - 0xd], 1
jmp 0x409393
cmp dword [ebp + 0x10], ebx
je 0x409390
cmp dword [ebp - 0x24], 8
mov esi, dword [ebp - 0x38]
jae 0x409362
lea esi, [ebp - 0x38]
push dword [ebp - 0x18]
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.INTERNET_READ_FILE_ERROR
push ecx
call fcn.00402e56
pop ecx
mov esi, eax
call fcn.00405362
mov ecx, dword [ebp + 0x10]
push eax
push 2
pop esi
call fcn.00422620
add esp, 0x14
mov byte [ebp - 0xd], bl
mov byte [ebp - 4], 2
push ebx
push 1
lea ecx, [ebp - 0x3c]
call fcn.0040337f
mov byte [ebp - 4], 1
push ebx
push 1
lea ecx, [ebp - 0x60]
call fcn.0040337f
or dword [ebp - 4], 0xffffffff
push ebx
push 1
lea ecx, [ebp - 0x7c]
call fcn.0040337f
mov al, byte [ebp - 0xd]
jmp 0x408f5b