Function at 0x402570
Capabilities:
Check http status code
Get file size
Send data
Send http request

Disassembly:
sub esp, 0x244
mov eax, dword [0x4b0650]
xor eax, esp
mov dword [esp + 0x240], eax
movzx eax, byte [esp + 0x248]
push ebx
push esi
push edi
mov edi, dword [esp + 0x258]
push eax
push str.MultiBlockDownloader::GetInfo__bTryPartial___d
mov esi, ecx
call fcn.0040de80
mov ecx, dword [esi + 0x3c]
mov edx, dword [esi + 0x50]
add esp, 8
push esi
xor ebx, ebx
push 0x24080000
push ebx
push ebx
push ebx
push ecx
push 0x492cd4
push edx
mov dword [esp + 0x2c], 0x80004005
mov dword [esi + 0x218], 1
mov dword [esi + 0x1f8], ebx
mov dword [esi + 0x1fc], ebx
mov byte [esi + 0x1f4], bl
mov dword [esi + 0x200], ebx
mov dword [esi + 0x204], ebx
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
cmp eax, ebx
mov dword [esi + 0x1f0], eax
jne 0x402630
lea eax, [esp + 0xc]
push str.HttpOpenRequest
push eax
call fcn.004012f0
add esp, 8
cmp edi, ebx
je 0x402932
push str.failed_at_HttpOpenRequest
push 0x1000
push edi
call fcn.00477bdc
add esp, 0xc
jmp 0x402932
push eax
push 0x492cd4
push str.HttpOpenRequestW_lpszVerb____s___m_hRequest___.8X
call fcn.0040de80
mov ecx, dword [esi + 0x3c]
push ecx
push str.m_urlcTarget.lpszUrlPath___s
call fcn.0040de80
add esp, 0x14
cmp byte [esp + 0x254], bl
je 0x4026a9
mov edx, dword [esi + 0x1f0]
push 0x20000000
push 0xffffffffffffffff
push str.RANGE:_bytes0_1
push edx
call dword [sym.imp.WININET.dll_HttpAddRequestHeadersW]
test eax, eax
jne 0x4026a9
lea eax, [esp + 0xc]
push str.HttpAddRequestHeaders
push eax
call fcn.004012f0
add esp, 8
cmp edi, ebx
je 0x402932
push str.failed_at_HttpAddRequestHeaders
push 0x1000
push edi
call fcn.00477bdc
add esp, 0xc
jmp 0x402932
mov edx, dword [esi + 0x1f0]
xor eax, eax
push esi
push 8
push ebx
lea ecx, [esp + 0x28]
push ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x48], eax
push edx
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x30], 0x28
mov dword [esp + 0x4c], ebx
call dword [sym.imp.WININET.dll_HttpSendRequestExW]
test eax, eax
jne 0x40272b
lea eax, [esp + 0xc]
push 0x4930ac
push eax
call fcn.004012f0
add esp, 8
cmp edi, ebx
je 0x402932
push str.failed_at_HttpSendRequestExW
push 0x1000
push edi
call fcn.00477bdc
add esp, 0xc
jmp 0x402932
mov ecx, dword [esi + 0x1f0]
push esi
push ebx
push ebx
push ecx
call dword [sym.imp.WININET.dll_HttpEndRequestW]
test eax, eax
jne 0x402771
lea edx, [esp + 0xc]
push 0x492fdc
push edx
call fcn.004012f0
add esp, 8
cmp edi, ebx
je 0x402932
push str.failed_at_HttpEndRequestW
push 0x1000
push edi
call fcn.00477bdc
add esp, 0xc
jmp 0x402932
mov edx, dword [esi + 0x1f0]
push ebp
mov ebp, dword [sym.imp.WININET.dll_HttpQueryInfoW]
push ebx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x20]
push ecx
push 0x20000013
push edx
mov dword [esp + 0x28], 4
call ebp
test eax, eax
jne 0x4027cf
lea eax, [esp + 0x10]
push str.HttpQueryInfo
push eax
call fcn.004012f0
add esp, 8
cmp edi, ebx
je 0x402931
push str.failed_at_HttpQueryInfo
push 0x1000
push edi
call fcn.00477bdc
add esp, 0xc
jmp 0x402931
mov eax, dword [esp + 0x18]
cmp eax, 0xce
mov dword [esp + 0x14], 0x104
jne 0x402882
cmp byte [esp + 0x258], bl
je 0x4028aa
mov eax, dword [esi + 0x1f0]
push ebx
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x50]
push edx
push 0x35
push eax
call ebp
test eax, eax
jne 0x40283f
lea ecx, [esp + 0x10]
push str.HttpQueryInfo
push ecx
call fcn.004012f0
add esp, 8
cmp edi, ebx
je 0x402931
push str.failed_at_HttpQueryInfo_HTTP_QUERY_CONTENT_RANGE
push 0x1000
push edi
call fcn.00477bdc
add esp, 0xc
jmp 0x402931
mov edx, dword [esp + 0x14]
push edx
lea eax, [esp + 0x4c]
push eax
push str.HttpQueryInfoW_HTTP_QUERY_CONTENT_RANGE___szInfo___I64d__dwInfoSize___d
call fcn.0040de80
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x54]
shr ecx, 1
push 0x2f
push edx
mov word [esp + ecx*2 + 0x5c], bx
call fcn.00477e1f
add eax, 2
push eax
call fcn.00478ca5
add esp, 0x18
mov byte [esi + 0x1f4], 1
jmp 0x402921
cmp eax, 0xc8
je 0x4028aa
cmp edi, ebx
je 0x402931
push eax
push str.failed_at_HttpQueryInfo_with_HTTP_code__d
push 0x1000
push edi
call fcn.00477bdc
add esp, 0x10
jmp 0x402931
mov edx, dword [esi + 0x1f0]
push ebx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x50]
push ecx
push 5
push edx
call ebp
test eax, eax
jne 0x4028ef
lea eax, [esp + 0x10]
push str.HttpQueryInfo
push eax
call fcn.004012f0
add esp, 8
cmp edi, ebx
je 0x402931
push str.failed_at_HttpQueryInfo_HTTP_QUERY_CONTENT_LENGTH
push 0x1000
push edi
call fcn.00477bdc
add esp, 0xc
jmp 0x402931
mov ecx, dword [esp + 0x14]
push ecx
lea edx, [esp + 0x4c]
push edx
push str.HttpQueryInfoW_HTTP_QUERY_CONTENT_LENGTH___szInfo___I64d__dwInfoSize___d
call fcn.0040de80
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x54]
shr eax, 1
push ecx
mov word [esp + eax*2 + 0x58], bx
call fcn.00478ca5
add esp, 0x10
mov byte [esi + 0x1f4], bl
mov dword [esp + 0x10], ebx
mov dword [esi + 0x1fc], edx
mov dword [esi + 0x1f8], eax
pop ebp
cmp byte [esi + 0x1f4], bl
je 0x402941
push str.Support_Partial:_true
jmp 0x402946
push str.Support_Partial:_false
call fcn.0040de80
mov eax, dword [esi + 0x1f0]
add esp, 4
cmp eax, ebx
je 0x402973
push ebx
push eax
call dword [sym.imp.WININET.dll_InternetSetStatusCallbackW]
mov edx, dword [esi + 0x1f0]
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [esi + 0x1f0], ebx
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
lea eax, [esi + 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x4029cc
lea ecx, [esp + 0x14]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
push edi
mov dword [esi + 0x200], eax
mov dword [esi + 0x204], ecx
mov dword [esi + 0x208], eax
mov dword [esi + 0x20c], ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4029e4
mov dword [esi + 0x200], ebx
mov dword [esi + 0x204], ebx
mov dword [esi + 0x208], ebx
mov dword [esi + 0x20c], ebx
mov ecx, dword [esp + 0x24c]
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00477bf8
add esp, 0x244
ret 8