Function at 0x410dbc
Capabilities:
Check http status code
Connect to http server
Create http request
Read data from internet
Receive data
Send data
Send http request

Disassembly:
mov eax, 0x56c786
call fcn.0055a6a0
sub esp, 0x390
push ebx
push esi
xor ebx, ebx
test byte [0x62659c], 1
push edi
mov edi, 0x5bbe28
jne 0x410dfe
or dword [0x62659c], 1
mov dword [ebp - 4], ebx
push edi
call fcn.00504d8b
mov esi, eax
pop ecx
mov dword [0x626598], esi
or dword [ebp - 4], 0xffffffff
jmp 0x410e04
mov esi, dword [0x626598]
mov ecx, dword [ebp + 0x10]
push esi
push ebx
push edi
call fcn.00408d5d
cmp eax, ebx
jl 0x410e16
lea ebx, [esi + eax]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
mov edi, dword [ebp + 0xc]
push dword [edi + 0x10]
and dword [ebp - 0x2c], 0
and dword [ebp - 0x28], 0
mov dword [ebp - 0x6c], ecx
mov ecx, dword [eax + 0x1c]
mov dword [ebp - 0x68], ecx
mov ecx, dword [eax + 0x28]
mov eax, dword [eax + 0x2c]
lea esi, [ebp - 0x34]
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x70], eax
call fcn.00404e1a
push dword [edi + 0xc]
lea esi, [ebp - 0x24]
call fcn.00404e1a
push dword [ebp - 0x30]
lea eax, [ebp - 0x98]
push dword [ebp - 0x34]
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push eax
mov eax, edi
call fcn.00411c80
mov ecx, dword [ebp + 0x10]
push ebx
push 0
lea eax, [ebp - 0xb4]
push eax
call fcn.0040208e
mov dword [ebp - 4], 1
test ebx, ebx
jle 0x410f1e
cmp dword [ebp - 0x9c], 8
mov eax, dword [ebp - 0xb0]
jae 0x410ea2
lea eax, [ebp - 0xb0]
push ebx
mov esi, str.http:__
push esi
push eax
call fcn.0041ee30
add esp, 0xc
test eax, eax
je 0x410f1e
xor edi, edi
cmp dword [ebp + 0x14], edi
je 0x410ef6
cmp dword [ebp - 0x9c], 8
mov eax, dword [ebp - 0xb0]
jae 0x410ed2
lea eax, [ebp - 0xb0]
push esi
push eax
push str.CHECK_PROTOCOL_ERROR
push ecx
call fcn.004032e1
pop ecx
mov esi, eax
call fcn.0040582a
mov ecx, dword [ebp + 0x14]
push eax
push 2
pop esi
call fcn.00420490
add esp, 0xc
or esi, 0xffffffff
or dword [ebp - 4], 0xffffffff
push edi
push 1
lea ecx, [ebp - 0xb4]
call fcn.00403580
mov ecx, dword [ebp - 0xc]
pop edi
mov eax, esi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 0x10
push 7
pop esi
xor edi, edi
push edi
lea ecx, [ebp - 0x90]
mov dword [ebp - 0x78], esi
call fcn.00403667
mov byte [ebp - 4], 2
push edi
lea ecx, [ebp - 0x54]
mov dword [ebp - 0x3c], esi
call fcn.00403667
mov byte [ebp - 4], 3
mov ecx, dword [ebp + 0x10]
push 1
push ebx
lea eax, [ebp - 0x38]
push eax
mov dword [ebp - 0x38], 0x2f
call fcn.00408d5d
mov ecx, dword [ebp + 0x10]
mov esi, eax
cmp esi, edi
jle 0x410fb5
sub eax, ebx
push eax
push ebx
lea eax, [ebp - 0xd0]
push eax
call fcn.0040208e
mov byte [ebp - 4], 4
push 0xffffffffffffffff
push edi
push eax
lea ecx, [ebp - 0x90]
call fcn.00403685
mov byte [ebp - 4], 3
push edi
push 1
lea ecx, [ebp - 0xd0]
call fcn.00403580
mov ecx, dword [ebp + 0x10]
push 0xffffffffffffffff
push esi
lea eax, [ebp - 0xd0]
push eax
call fcn.0040208e
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x54]
jmp 0x410fce
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0xd0]
push eax
call fcn.0040208e
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x90]
push 0xffffffffffffffff
push edi
push eax
call fcn.00403685
mov byte [ebp - 4], 3
push edi
push 1
lea ecx, [ebp - 0xd0]
call fcn.00403580
cmp dword [ebp - 0x3c], 8
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x18], 5
mov dword [ebp - 0x38], edi
mov dword [ebp + 0x10], edi
mov dword [ebp - 0x1c], edi
jae 0x411005
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x15c]
call fcn.00411ae6
mov byte [ebp - 4], 7
push edi
push edi
push edi
push 1
push str.YmirPatcherv2.0.1
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x58], eax
cmp eax, edi
jne 0x41109d
cmp dword [ebp + 0x14], edi
je 0x411057
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.INTERNET_OPEN_ERROR
call fcn.004032e1
mov esi, eax
call fcn.0040582a
mov ecx, dword [ebp + 0x14]
push eax
push 2
pop esi
call fcn.00420490
pop ecx
pop ecx
mov byte [ebp - 4], 3
lea eax, [ebp - 0x158]
cmp dword [ebp - 0x15c], eax
je 0x411075
push dword [ebp - 0x15c]
call fcn.005053fb
pop ecx
mov byte [ebp - 4], 2
push edi
push 1
lea ecx, [ebp - 0x54]
call fcn.00403580
mov byte [ebp - 4], 1
push edi
push 1
lea ecx, [ebp - 0x90]
call fcn.00403580
xor esi, esi
jmp 0x410ef9
cmp dword [ebp + 0x10], edi
je 0x4110ae
push dword [ebp + 0x10]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp + 0x10], edi
cmp dword [ebp - 0x1c], edi
je 0x4110bc
push dword [ebp - 0x1c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x78], 8
mov eax, dword [ebp - 0x8c]
jae 0x4110ce
lea eax, [ebp - 0x8c]
push edi
push edi
push 3
push edi
push edi
push 0x50
push eax
push dword [ebp - 0x58]
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x1c], eax
cmp eax, edi
je 0x411374
mov ecx, dword [ebp - 0x15c]
call fcn.0041f240
mov esi, eax
imul esi, esi, 3
inc esi
lea eax, [esi + esi + 2]
push eax
call fcn.0050513d
pop ecx
mov ecx, dword [ebp - 0x15c]
mov ebx, eax
call fcn.0041f240
cmp ebx, edi
je 0x411123
push eax
push esi
mov eax, ecx
mov edx, ebx
call fcn.0041f8a0
push edi
push 0x84000100
push edi
push edi
push str.HTTP_1.1
push ebx
push 0x5bbeec
push dword [ebp - 0x1c]
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov esi, eax
push ebx
mov dword [ebp + 0x10], esi
call fcn.005053fb
pop ecx
cmp esi, edi
je 0x4113be
push 0x200
lea eax, [ebp - 0x39c]
push edi
push eax
xor ebx, ebx
call fcn.00507370
mov eax, dword [ebp - 0x2c]
add esp, 0xc
or eax, dword [ebp - 0x28]
je 0x411193
push dword [ebp - 0x28]
lea eax, [ebp - 0x39c]
push dword [ebp - 0x2c]
push str.Range:_bytes_I64u__r_n
push 0x100
push eax
call fcn.0041f040
add esp, 0x14
mov ebx, eax
push edi
push edi
push ebx
lea eax, [ebp - 0x39c]
push eax
push esi
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x4113e2
mov ebx, dword [sym.imp.WININET.dll_HttpQueryInfoW]
push edi
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x20000013
push esi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x60], 4
call ebx
test eax, eax
je 0x411406
cmp dword [ebp - 0x14], 0xc8
je 0x4111eb
cmp dword [ebp - 0x14], 0xce
jne 0x41142d
push edi
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x19c]
push eax
push 5
push esi
mov dword [ebp - 0x60], 0x40
call ebx
test eax, eax
je 0x41146b
lea eax, [ebp - 0x19c]
push eax
call fcn.005081d8
pop ecx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x34], eax
mov eax, dword [ecx + 0x10]
sub eax, dword [ecx + 0xc]
xor edx, edx
cmp dword [ebp - 0x34], eax
jne 0x41122f
cmp edx, edi
je 0x411239
push dword [ebp - 0x34]
mov eax, ecx
call fcn.00411bd3
mov eax, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x2c]
mov dword [ebp - 0x20], eax
xor eax, eax
cmp dword [ebp - 0x20], eax
jg 0x41149f
jl 0x411258
cmp ebx, dword [ebp - 0x34]
jae 0x41149f
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
call dword [eax + 0x10]
test al, al
je 0x4114a6
mov eax, dword [ebp - 0x34]
push 0
sub eax, ebx
pop ecx
sbb ecx, dword [ebp - 0x20]
mov dword [ebp - 0x60], ecx
js 0x41128a
jg 0x411281
cmp eax, 0x1000
jbe 0x41128a
mov dword [ebp - 0x14], 0x1000
jmp 0x41128d
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x5c], edi
cmp dword [ebp - 0x14], edi
je 0x41149f
mov edi, dword [ebp + 0xc]
push dword [edi + 0xc]
lea esi, [ebp - 0x98]
call fcn.00404e1a
lea eax, [ebp - 0x5c]
push eax
push dword [ebp - 0x14]
call fcn.004171db
add eax, ebx
push eax
push dword [ebp + 0x10]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x4112f5
mov edx, dword [ebp - 0x5c]
test edx, edx
je 0x411363
mov ecx, dword [ebp + 8]
xor eax, eax
push eax
push dword [ebp - 0x34]
add ebx, edx
adc dword [ebp - 0x20], eax
add dword [ecx + 0x28], edx
push dword [ebp - 0x20]
mov edx, dword [ecx]
adc dword [ecx + 0x2c], eax
push ebx
call dword [edx + 4]
xor edi, edi
jmp 0x411242
cmp dword [ebp + 0x14], 0
je 0x41133b
cmp dword [ebp - 0x3c], 8
mov esi, dword [ebp - 0x50]
jae 0x411307
lea esi, [ebp - 0x50]
xor eax, eax
push eax
push dword [ebp - 0x34]
push dword [ebp - 0x20]
push ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.INTERNET_READ_FILE_ERROR
push ecx
call fcn.004032e1
pop ecx
mov esi, eax
call fcn.0040582a
mov ecx, dword [ebp + 0x14]
push eax
push 2
pop esi
call fcn.00420490
add esp, 0x1c
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x18], 0
jle 0x4114a6
mov eax, dword [ebp - 0x20]
dec dword [ebp - 0x18]
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], eax
xor edi, edi
jmp 0x41109d
cmp dword [ebp + 0x14], 0
je 0x41133b
cmp dword [ebp - 0x3c], 8
jb 0x411304
mov esi, dword [ebp - 0x50]
jmp 0x411307
cmp dword [ebp + 0x14], edi
je 0x4114a6
cmp dword [ebp - 0x78], 8
mov esi, dword [ebp - 0x8c]
jae 0x41138f
lea esi, [ebp - 0x8c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.INTERNET_CONNECT_ERROR
push ecx
call fcn.004032e1
pop ecx
mov esi, eax
call fcn.0040582a
mov ecx, dword [ebp + 0x14]
push eax
push 2
pop esi
call fcn.00420490
add esp, 0xc
jmp 0x4114a6
cmp dword [ebp + 0x14], edi
je 0x4114a6
cmp dword [ebp - 0x3c], 8
mov esi, dword [ebp - 0x50]
jae 0x4113d3
lea esi, [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_OPEN_REQUEST_ERROR
jmp 0x41139c
cmp dword [ebp + 0x14], edi
je 0x4114a6
cmp dword [ebp - 0x3c], 8
mov esi, dword [ebp - 0x50]
jae 0x4113f7
lea esi, [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_SEND_REQUEST_ERROR
jmp 0x41139c
cmp dword [ebp + 0x14], edi
je 0x4114a6
cmp dword [ebp - 0x3c], 8
mov esi, dword [ebp - 0x50]
jae 0x41141b
lea esi, [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_QUERY_STATUS_CODE_ERROR
jmp 0x41139c
cmp dword [ebp + 0x14], edi
je 0x4114a6
cmp dword [ebp - 0x3c], 8
mov esi, dword [ebp - 0x50]
jae 0x41143e
lea esi, [ebp - 0x50]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_QUERY_STATUS_NOT_OK
call fcn.004032e1
mov esi, eax
call fcn.0040582a
push eax
mov ecx, dword [ebp + 0x14]
push 2
pop esi
call fcn.00420490
add esp, 0x10
jmp 0x4114a6
cmp dword [ebp + 0x14], edi
je 0x4114a6
cmp dword [ebp - 0x3c], 8
mov esi, dword [ebp - 0x50]
jae 0x41147c
lea esi, [ebp - 0x50]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_QUERY_CONTENT_LENGTH_ERROR
push ecx
call fcn.004032e1
pop ecx
mov esi, eax
call fcn.0040582a
push eax
push str._s__path_s__error_d_
jmp 0x41145b
mov dword [ebp - 0x38], 1
xor edi, edi
cmp dword [ebp + 0x10], edi
je 0x4114b6
push dword [ebp + 0x10]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x1c], edi
je 0x4114c4
push dword [ebp - 0x1c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push dword [ebp - 0x58]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, dword [ebp - 0x38]
cmp esi, edi
jne 0x4114ef
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x6c]
mov dword [eax + 0x18], ecx
mov ecx, dword [ebp - 0x68]
mov dword [eax + 0x1c], ecx
mov ecx, dword [ebp - 0x74]
mov dword [eax + 0x28], ecx
mov ecx, dword [ebp - 0x70]
mov dword [eax + 0x2c], ecx
mov byte [ebp - 4], 3
lea eax, [ebp - 0x158]
cmp dword [ebp - 0x15c], eax
je 0x41150d
push dword [ebp - 0x15c]
call fcn.005053fb
pop ecx
mov byte [ebp - 4], 2
push edi
push 1
lea ecx, [ebp - 0x54]
call fcn.00403580
mov byte [ebp - 4], 1
push edi
push 1
lea ecx, [ebp - 0x90]
call fcn.00403580
jmp 0x410ef9