Function at 0x4105cd
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, 0x5e44f7
call fcn.005c3f5c
sub esp, 0x390
test byte [0x6b4150], 1
push ebx
push esi
push edi
mov edi, 0x62bb80
jne 0x41060f
or dword [0x6b4150], 1
xor ebx, ebx
mov dword [ebp - 4], ebx
push edi
call fcn.00574a6b
mov esi, eax
pop ecx
mov dword [0x6b414c], esi
or dword [ebp - 4], 0xffffffff
jmp 0x410617
mov esi, dword [0x6b414c]
xor ebx, ebx
mov ecx, dword [ebp + 0x10]
push esi
push ebx
push edi
call fcn.004088d1
cmp eax, ebx
jl 0x41062a
add esi, eax
jmp 0x41062c
xor esi, esi
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
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]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x50], ebx
call fcn.00411250
mov ecx, dword [ebp + 0x10]
push esi
push ebx
lea eax, [ebp - 0xac]
push eax
call fcn.004095bf
mov dword [ebp - 4], 1
cmp esi, ebx
jle 0x410704
cmp dword [ebp - 0x94], 8
mov eax, dword [ebp - 0xa8]
jae 0x41068a
lea eax, [ebp - 0xa8]
push esi
mov edi, 0x62bb70
push edi
push eax
call fcn.0041ec90
add esp, 0xc
test eax, eax
je 0x410704
cmp dword [ebp + 0x14], ebx
je 0x4106dc
cmp dword [ebp - 0x94], 8
mov eax, dword [ebp - 0xa8]
jae 0x4106b8
lea eax, [ebp - 0xa8]
push edi
push eax
push str.CHECK_PROTOCOL_ERROR
push ecx
call fcn.00403080
add esp, 4
call fcn.00405670
mov edi, dword [ebp + 0x14]
push eax
push 2
pop esi
call fcn.00420400
add esp, 0xc
or esi, 0xffffffff
or dword [ebp - 4], 0xffffffff
push ebx
push 1
lea ecx, [ebp - 0xac]
call fcn.00403955
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 edi
push ebx
lea ecx, [ebp - 0x90]
mov dword [ebp - 0x78], edi
call fcn.00403a3c
mov byte [ebp - 4], 2
push ebx
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x34], edi
call fcn.00403a3c
mov byte [ebp - 4], 3
mov ecx, dword [ebp + 0x10]
push 1
push esi
lea eax, [ebp - 0x30]
push eax
mov dword [ebp - 0x30], 0x2f
call fcn.004088d1
mov ecx, dword [ebp + 0x10]
mov edi, eax
cmp edi, ebx
jle 0x410799
sub eax, esi
push eax
push esi
lea eax, [ebp - 0xd0]
push eax
call fcn.004095bf
mov byte [ebp - 4], 4
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp - 0x90]
call fcn.00403a5a
mov byte [ebp - 4], 3
push ebx
push 1
lea ecx, [ebp - 0xd0]
call fcn.00403955
mov ecx, dword [ebp + 0x10]
push 0xffffffffffffffff
push edi
lea eax, [ebp - 0xd0]
push eax
call fcn.004095bf
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x4c]
jmp 0x4107b2
push 0xffffffffffffffff
push esi
lea eax, [ebp - 0xd0]
push eax
call fcn.004095bf
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x90]
push 0xffffffffffffffff
push ebx
push eax
call fcn.00403a5a
mov byte [ebp - 4], 3
push ebx
push 1
lea ecx, [ebp - 0xd0]
call fcn.00403955
cmp dword [ebp - 0x34], 8
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x20], 5
mov dword [ebp - 0x30], ebx
mov dword [ebp + 0x10], ebx
mov dword [ebp - 0x24], ebx
jae 0x4107e9
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x15c]
call fcn.0041128d
mov byte [ebp - 4], 7
push ebx
push ebx
push ebx
push 1
push str.YmirPatcherv1.8.1
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x58], eax
cmp eax, ebx
jne 0x41087e
mov edi, dword [ebp + 0x14]
cmp edi, ebx
je 0x410838
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.INTERNET_OPEN_ERROR
call fcn.00403080
call fcn.00405670
push eax
push 2
pop esi
call fcn.00420400
pop ecx
pop ecx
mov byte [ebp - 4], 3
lea eax, [ebp - 0x158]
cmp dword [ebp - 0x15c], eax
je 0x410856
push dword [ebp - 0x15c]
call fcn.00574f18
pop ecx
mov byte [ebp - 4], 2
push ebx
push 1
lea ecx, [ebp - 0x4c]
call fcn.00403955
mov byte [ebp - 4], 1
push ebx
push 1
lea ecx, [ebp - 0x90]
call fcn.00403955
xor esi, esi
jmp 0x4106df
mov edi, dword [ebp - 0x50]
cmp dword [ebp + 0x10], ebx
je 0x410892
push dword [ebp + 0x10]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp + 0x10], ebx
cmp dword [ebp - 0x24], ebx
je 0x4108a0
push dword [ebp - 0x24]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x78], 8
mov eax, dword [ebp - 0x8c]
jae 0x4108b2
lea eax, [ebp - 0x8c]
push ebx
push ebx
push 3
push ebx
push ebx
push 0x50
push eax
push dword [ebp - 0x58]
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x24], eax
cmp eax, ebx
je 0x410b70
mov ecx, dword [ebp - 0x15c]
call fcn.0041f090
mov esi, eax
imul esi, esi, 3
inc esi
lea eax, [esi + esi + 2]
push eax
call fcn.00574d4a
pop ecx
mov ecx, dword [ebp - 0x15c]
mov dword [ebp - 0x14], eax
call fcn.0041f090
cmp dword [ebp - 0x14], ebx
je 0x41090a
mov edx, dword [ebp - 0x14]
push eax
push esi
mov eax, ecx
call fcn.0041f800
push ebx
push 0x84000100
push ebx
push ebx
push str.HTTP_1.1
push dword [ebp - 0x14]
push 0x62bc44
push dword [ebp - 0x24]
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
push dword [ebp - 0x14]
mov dword [ebp + 0x10], eax
call fcn.00574f18
pop ecx
cmp dword [ebp + 0x10], ebx
je 0x410bb9
push 0x200
lea eax, [ebp - 0x39c]
push ebx
push eax
xor esi, esi
call fcn.00576e90
mov eax, dword [ebp - 0x54]
add esp, 0xc
or eax, edi
je 0x41097a
push edi
push dword [ebp - 0x54]
lea eax, [ebp - 0x39c]
push str.Range:_bytes_I64u__r_n
push 0x100
push eax
call fcn.0041ee90
add esp, 0x14
mov esi, eax
push ebx
push ebx
push esi
lea eax, [ebp - 0x39c]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
je 0x410bdf
mov esi, dword [sym.imp.WININET.dll_HttpQueryInfoW]
push ebx
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x20000013
push dword [ebp + 0x10]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x60], 4
call esi
test eax, eax
je 0x410c05
cmp dword [ebp - 0x14], 0xc8
je 0x4109d6
cmp dword [ebp - 0x14], 0xce
jne 0x410c2e
push ebx
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x19c]
push eax
push 5
push dword [ebp + 0x10]
mov dword [ebp - 0x60], 0x40
call esi
test eax, eax
je 0x410c69
lea eax, [ebp - 0x19c]
push eax
call fcn.00577bc8
pop ecx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx + 0x10]
sub eax, dword [ecx + 0xc]
mov dword [ebp - 0x18], ebx
cmp dword [ebp - 0x1c], eax
jne 0x410a1d
cmp ebx, ebx
je 0x410a27
push dword [ebp - 0x1c]
mov eax, ecx
call fcn.004112f3
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], edi
mov esi, dword [ebp - 0x28]
cmp esi, dword [ebp - 0x18]
jg 0x410c9f
jl 0x410a4a
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x1c]
jae 0x410c9f
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
call dword [eax + 0x10]
test al, al
je 0x410caa
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x18]
sbb ecx, esi
mov dword [ebp - 0x60], ecx
js 0x410a7c
jg 0x410a73
cmp eax, 0x1000
jbe 0x410a7c
mov dword [ebp - 0x14], 0x1000
jmp 0x410a7f
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x5c], ebx
cmp dword [ebp - 0x14], ebx
je 0x410c9f
mov edi, dword [ebp + 0xc]
mov ebx, dword [edi + 0xc]
lea esi, [ebp - 0xb4]
call fcn.00424e0d
lea eax, [ebp - 0x5c]
push eax
push dword [ebp - 0x14]
call fcn.00438751
mov ebx, dword [ebp - 0x2c]
add eax, ebx
push eax
push dword [ebp + 0x10]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x410af5
mov edx, dword [ebp - 0x5c]
test edx, edx
je 0x410b5e
mov ecx, dword [ebp + 8]
push dword [ebp - 0x18]
xor eax, eax
push dword [ebp - 0x1c]
add ebx, edx
adc dword [ebp - 0x28], eax
add dword [ecx + 0x18], edx
push dword [ebp - 0x28]
mov dword [ebp - 0x2c], ebx
adc dword [ecx + 0x1c], eax
add dword [ecx + 0x28], edx
push ebx
adc dword [ecx + 0x2c], eax
mov eax, dword [ecx]
call dword [eax + 4]
xor ebx, ebx
jmp 0x410a30
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x410b39
cmp dword [ebp - 0x34], 8
mov esi, dword [ebp - 0x48]
jae 0x410b08
lea esi, [ebp - 0x48]
push dword [ebp - 0x18]
push dword [ebp - 0x1c]
push dword [ebp - 0x28]
push ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.INTERNET_READ_FILE_ERROR
push ecx
call fcn.00403080
add esp, 4
call fcn.00405670
push eax
push 2
pop esi
call fcn.00420400
add esp, 0x1c
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x20], 0
jle 0x410ca8
dec dword [ebp - 0x20]
mov edi, dword [ebp - 0x28]
mov dword [ebp - 0x54], ebx
xor ebx, ebx
jmp 0x410881
mov edi, dword [ebp + 0x14]
test edi, edi
je 0x410b39
cmp dword [ebp - 0x34], 8
jb 0x410b05
mov esi, dword [ebp - 0x48]
jmp 0x410b08
mov edi, dword [ebp + 0x14]
cmp edi, ebx
je 0x410caa
cmp dword [ebp - 0x78], 8
mov esi, dword [ebp - 0x8c]
jae 0x410b8d
lea esi, [ebp - 0x8c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.INTERNET_CONNECT_ERROR
push ecx
call fcn.00403080
add esp, 4
call fcn.00405670
push eax
push 2
pop esi
call fcn.00420400
add esp, 0xc
jmp 0x410caa
mov edi, dword [ebp + 0x14]
cmp edi, ebx
je 0x410caa
cmp dword [ebp - 0x34], 8
mov esi, dword [ebp - 0x48]
jae 0x410bd0
lea esi, [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_OPEN_REQUEST_ERROR
jmp 0x410b9a
mov edi, dword [ebp + 0x14]
cmp edi, ebx
je 0x410caa
cmp dword [ebp - 0x34], 8
mov esi, dword [ebp - 0x48]
jae 0x410bf6
lea esi, [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_SEND_REQUEST_ERROR
jmp 0x410b9a
mov edi, dword [ebp + 0x14]
cmp edi, ebx
je 0x410caa
cmp dword [ebp - 0x34], 8
mov esi, dword [ebp - 0x48]
jae 0x410c1c
lea esi, [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_QUERY_STATUS_CODE_ERROR
jmp 0x410b9a
mov edi, dword [ebp + 0x14]
cmp edi, ebx
je 0x410caa
cmp dword [ebp - 0x34], 8
mov esi, dword [ebp - 0x48]
jae 0x410c41
lea esi, [ebp - 0x48]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_QUERY_STATUS_NOT_OK
call fcn.00403080
call fcn.00405670
push eax
push 2
pop esi
call fcn.00420400
add esp, 0x10
jmp 0x410caa
mov edi, dword [ebp + 0x14]
cmp edi, ebx
je 0x410caa
cmp dword [ebp - 0x34], 8
mov esi, dword [ebp - 0x48]
jae 0x410c7c
lea esi, [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.HTTP_QUERY_CONTENT_LENGTH_ERROR
push ecx
call fcn.00403080
add esp, 4
call fcn.00405670
push eax
push str._s__path_s__error_d_
jmp 0x410c5c
mov dword [ebp - 0x30], 1
jmp 0x410caa
xor ebx, ebx
cmp dword [ebp + 0x10], ebx
je 0x410cb8
push dword [ebp + 0x10]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x24], ebx
je 0x410cc6
push dword [ebp - 0x24]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push dword [ebp - 0x58]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, dword [ebp - 0x30]
cmp esi, ebx
jne 0x410cf1
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 0x410d0f
push dword [ebp - 0x15c]
call fcn.00574f18
pop ecx
mov byte [ebp - 4], 2
push ebx
push 1
lea ecx, [ebp - 0x4c]
call fcn.00403955
mov byte [ebp - 4], 1
push ebx
push 1
lea ecx, [ebp - 0x90]
call fcn.00403955
jmp 0x4106df