Function at 0x4226a6
Capabilities:
Check http status code
Connect to http server
Create http request
Parse url
Send data
Send http request

Disassembly:
push 0xd0
mov eax, 0x4b02c9
call fcn.0046c418
mov dword [ebp - 0x44], ecx
push str.DownloadFileDirectly..._URL:
lea ecx, [ebp - 0x10]
call fcn.00402829
mov esi, dword [ebp + 0xc]
lea edx, [ebp - 0x10]
xor ebx, ebx
push ebx
push esi
push 2
pop ecx
mov dword [ebp - 4], ebx
call fcn.00414600
or dword [ebp - 4], 0xffffffff
pop ecx
pop ecx
mov ecx, dword [ebp - 0x10]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov eax, dword [esi]
sub eax, 0x10
mov dword [ebp - 0x4c], ebx
push eax
call fcn.00402d9f
pop ecx
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x40], esi
xor eax, eax
mov dword [ebp - 4], 1
mov edi, ebx
mov dword [ebp - 0x48], eax
and dword [ebp - 0x84], 0
lea eax, [ebp - 0xd8]
push 0x3c
push 0
push eax
call fcn.00484bc0
xor eax, eax
add esp, 0xc
inc eax
mov dword [ebp - 0xc4], eax
mov dword [ebp - 0xa8], eax
call fcn.00452601
push eax
lea ecx, [ebp - 0x2c]
call fcn.00402899
mov byte [ebp - 4], 2
call fcn.00452601
push eax
lea ecx, [ebp - 0x38]
call fcn.00402899
lea eax, [ebp - 0xd8]
mov byte [ebp - 4], 3
push eax
push 0
push dword [esi - 0xc]
push esi
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
je 0x422efc
push dword [ebp - 0xc8]
lea ecx, [ebp - 0x2c]
call fcn.0040286d
push dword [ebp - 0xc4]
lea eax, [ebp - 0x94]
push eax
lea ecx, [ebp - 0x2c]
call fcn.0040a9b9
push eax
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 5
call fcn.00402e14
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x94]
lea ecx, [ecx - 0x10]
call fcn.00402e64
push dword [ebp - 0xac]
lea ecx, [ebp - 0x38]
call fcn.0040286d
cmp dword [ebp - 0xcc], 3
mov dword [ebp - 0x28], 0x400200
jne 0x422807
push 0x50
pop edi
push str.Scheme_is_HTTP
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x74], edi
call fcn.00402829
push 0
push 2
lea edx, [ebp - 0x70]
mov byte [ebp - 4], 6
pop ecx
call fcn.00414d4f
pop ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x70]
jmp 0x422852
cmp dword [ebp - 0xcc], 4
jne 0x422eb3
mov edi, 0x1bb
mov dword [ebp - 0x28], 0xc00200
push str.Scheme_is_HTTPs
lea ecx, [ebp - 0x8c]
mov dword [ebp - 0x74], edi
call fcn.00402829
push 0
push 2
lea edx, [ebp - 0x8c]
mov byte [ebp - 4], 7
pop ecx
call fcn.00414d4f
pop ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x8c]
lea ecx, [ecx - 0x10]
call fcn.00402e64
xor eax, eax
push eax
push eax
push eax
push eax
push str.ARM_WinINet_Downloader
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x422e97
mov esi, dword [ebp - 0x2c]
xor ecx, ecx
push ecx
push ecx
push 3
push ecx
push ecx
push edi
push esi
push eax
mov dword [ebp - 0x9c], esi
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x48], eax
test eax, eax
je 0x422e44
mov edi, dword [ebp - 0x38]
xor ecx, ecx
push ecx
push dword [ebp - 0x28]
mov dword [ebp - 0x98], edi
push ecx
push ecx
push ecx
push edi
push 0x4ede10
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov ebx, eax
mov dword [ebp - 0x50], ebx
test ebx, ebx
je 0x422dfa
xor esi, esi
mov dword [ebp - 0x90], 4
and dword [ebp - 0x24], esi
mov dword [ebp - 0x34], esi
jmp 0x4228de
mov esi, dword [ebp - 0x34]
and dword [ebp - 0x30], 0
push 0
push 0
push 0
push 0
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x422a12
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.HttpSendRequest_failed:
lea ecx, [ebp - 0x54]
mov esi, eax
call fcn.00402829
push esi
push 2
lea edx, [ebp - 0x54]
mov byte [ebp - 4], 0xc
pop ecx
call fcn.00414d4f
pop ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x54]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov eax, dword [0x51b2c4]
test eax, eax
je 0x4229bd
cmp dword [0x51ae10], 0
jne 0x4229bd
push 0
push 6
push esi
push ebx
push dword [eax + 0x20]
call dword [sym.imp.WININET.dll_InternetErrorDlg]
push str.User_input_...
lea ecx, [ebp - 0x58]
mov edi, eax
call fcn.00402829
push edi
push 2
lea edx, [ebp - 0x58]
mov byte [ebp - 4], 0xd
pop ecx
call fcn.00414d4f
pop ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x58]
lea ecx, [ecx - 0x10]
call fcn.00402e64
cmp edi, 0x2f00
je 0x4228db
test edi, edi
jne 0x422cc9
cmp esi, 0x2f19
jne 0x422cc9
push 4
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0x80
push eax
push 0x1f
push ebx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
jmp 0x4228db
cmp esi, 0x2f19
jne 0x422cc9
push 4
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 0x80
push eax
push 0x1f
push ebx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
push str.Ignoring_error...
lea ecx, [ebp - 0x5c]
call fcn.00402829
push 0
push 2
lea edx, [ebp - 0x5c]
mov byte [ebp - 4], 0xe
pop ecx
call fcn.00414d4f
pop ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x5c]
lea ecx, [ecx - 0x10]
call fcn.00402e64
jmp 0x4228db
push 0
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0x24]
push eax
push 0x20000013
push ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x422d97
push str.Status_from_Direct_Downloader
lea ecx, [ebp - 0x60]
call fcn.00402829
mov byte [ebp - 4], 0x11
lea edx, [ebp - 0x60]
push dword [ebp - 0x24]
push 2
pop ecx
call fcn.00414d4f
pop ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x60]
lea ecx, [ecx - 0x10]
call fcn.00402e64
cmp dword [ebp - 0x24], 0xc8
je 0x422d71
mov edi, 0x197
cmp dword [ebp - 0x24], edi
je 0x422a86
cmp dword [ebp - 0x24], 0x191
jne 0x422dc2
push str.Authentication_required
lea ecx, [ebp - 0x64]
call fcn.00402829
push 0
push 2
lea edx, [ebp - 0x64]
mov byte [ebp - 4], 0x12
pop ecx
call fcn.00414d4f
pop ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x64]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov ecx, ebx
call fcn.00421fa1
test eax, eax
je 0x422d4d
call fcn.00452601
push eax
lea ecx, [ebp - 0x18]
call fcn.00402899
mov byte [ebp - 4], 0x14
call fcn.00452601
push eax
lea ecx, [ebp - 0x3c]
call fcn.00402899
mov byte [ebp - 4], 0x15
cmp esi, 2
ja 0x422c6a
mov ecx, dword [ebp - 0x44]
lea eax, [ebp - 0x3c]
push 1
push eax
lea eax, [ebp - 0x18]
push eax
lea ecx, [ecx + 0x3c]
call fcn.0043c079
test eax, eax
je 0x422c6a
inc esi
mov dword [ebp - 0x34], esi
call fcn.00452601
push eax
lea ecx, [ebp - 0x14]
call fcn.00402899
lea edx, [ebp - 0x14]
mov byte [ebp - 4], 0x17
lea ecx, [ebp - 0x3c]
call fcn.00447d67
test eax, eax
je 0x422bd9
cmp dword [ebp - 0x24], edi
mov edi, dword [ebp - 0x18]
mov esi, dword [edi - 0xc]
jne 0x422b86
cmp dword [edi - 4], 1
jle 0x422b53
push esi
lea ecx, [ebp - 0x18]
call fcn.00402aac
mov edi, dword [ebp - 0x18]
lea eax, [esi + 1]
push eax
push edi
push 0x2b
push ebx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov esi, dword [ebp - 0x14]
cmp dword [esi - 4], 1
mov eax, dword [esi - 0xc]
mov dword [ebp - 0x30], eax
jle 0x422b7f
push eax
lea ecx, [ebp - 0x14]
call fcn.00402aac
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x30]
inc eax
push eax
push esi
push 0x2c
jmp 0x422bc9
cmp dword [edi - 4], 1
jle 0x422b98
push esi
lea ecx, [ebp - 0x18]
call fcn.00402aac
mov edi, dword [ebp - 0x18]
lea eax, [esi + 1]
push eax
push edi
push 0x1c
push ebx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov esi, dword [ebp - 0x14]
cmp dword [esi - 4], 1
mov eax, dword [esi - 0xc]
mov dword [ebp - 0x30], eax
jle 0x422bc4
push eax
lea ecx, [ebp - 0x14]
call fcn.00402aac
mov esi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x30]
inc eax
push eax
push esi
push 0x1d
push ebx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov dword [ebp - 0x30], 1
jmp 0x422c0d
push str.Decryption_failed
lea ecx, [ebp - 0x68]
call fcn.00402829
push 0
push 2
lea edx, [ebp - 0x68]
mov byte [ebp - 4], 0x18
pop ecx
call fcn.00414d4f
pop ecx
mov byte [ebp - 4], 0x17
mov ecx, dword [ebp - 0x68]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov edi, dword [ebp - 0x18]
mov esi, dword [ebp - 0x14]
cmp dword [esi - 4], 1
mov ecx, dword [esi - 0xc]
mov dword [ebp - 0x50], ecx
jle 0x422c28
push ecx
lea ecx, [ebp - 0x14]
call fcn.00402aac
mov esi, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x50]
mov eax, esi
test ecx, ecx
je 0x422c37
mov byte [eax], 0
inc eax
sub ecx, 1
jne 0x422c2e
push 0xffffffffffffffff
lea ecx, [ebp - 0x14]
call fcn.0040ae39
push 0xffffffffffffffff
lea ecx, [ebp - 0x18]
call fcn.0040ae39
lea ecx, [esi - 0x10]
call fcn.00402e64
mov ecx, dword [ebp - 0x3c]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov esi, dword [ebp - 0x34]
lea ecx, [edi - 0x10]
mov byte [ebp - 4], 3
jmp 0x422cb5
mov ecx, str.Failed_to_get_CRDs:
cmp esi, 2
mov eax, str.Limit_getting_CRDs_reached
cmovbe eax, ecx
lea ecx, [ebp - 0x6c]
push eax
call fcn.00402829
push 0
push 2
lea edx, [ebp - 0x6c]
mov byte [ebp - 4], 0x16
pop ecx
call fcn.00414d4f
pop ecx
mov ecx, dword [ebp - 0x6c]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov ecx, dword [ebp - 0x3c]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x18]
add ecx, 0xfffffff0
call fcn.00402e64
cmp dword [ebp - 0x30], 0
jne 0x4228de
jmp 0x422dc2
mov eax, 0x1bb
cmp ax, word [ebp - 0x74]
jne 0x422dc2
mov ecx, dword [ebp - 0x44]
lea eax, [ebp - 0x40]
push eax
push dword [ebp + 8]
call fcn.0041f6c2
test eax, eax
je 0x422d45
push str.Switching_scheme
lea ecx, [ebp - 0x78]
call fcn.00402829
push 0
push 2
lea edx, [ebp - 0x78]
mov byte [ebp - 4], 0xf
pop ecx
call fcn.00414d4f
pop ecx
mov ecx, dword [ebp - 0x78]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov edi, dword [ebp - 0x20]
push edi
mov dword [ebp - 0x84], 1
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x48]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, dword [ebp - 0x40]
mov dword [ebp - 0x1c], esi
jmp 0x422dc8
mov esi, dword [ebp - 0x40]
mov dword [ebp - 0x1c], esi
jmp 0x422dc5
push str.No_CRDs_required
lea ecx, [ebp - 0x7c]
call fcn.00402829
push 0
push 2
lea edx, [ebp - 0x7c]
mov byte [ebp - 4], 0x13
pop ecx
call fcn.00414d4f
pop ecx
mov ecx, dword [ebp - 0x7c]
jmp 0x422dba
test esi, esi
je 0x422d80
mov ecx, dword [ebp - 0x44]
lea ecx, [ecx + 0x3c]
call fcn.0043bf12
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 8]
push ebx
call fcn.004221e1
mov dword [ebp - 0x4c], eax
jmp 0x422dc2
push str.HttpQueryInfo_failed:
lea ecx, [ebp - 0x80]
call fcn.00402829
mov byte [ebp - 4], 0x10
lea edx, [ebp - 0x80]
push dword [ebp - 0x24]
push 2
pop ecx
call fcn.00414d4f
pop ecx
mov ecx, dword [ebp - 0x80]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov esi, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x98]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x9c]
lea ecx, [ecx - 0x10]
call fcn.00402e64
cmp dword [ebp - 0x84], 0
jne 0x422711
jmp 0x422f45
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.HttpOpenRequest_failed:
lea ecx, [ebp - 0x10]
mov ebx, eax
call fcn.00402829
push ebx
push 2
lea edx, [ebp - 0x10]
mov byte [ebp - 4], 0xb
pop ecx
call fcn.00414d4f
pop ecx
mov ecx, dword [ebp - 0x10]
lea ecx, [ecx - 0x10]
call fcn.00402e64
lea ecx, [edi - 0x10]
call fcn.00402e64
lea ecx, [esi - 0x10]
mov byte [ebp - 4], 1
call fcn.00402e64
mov ebx, dword [ebp - 0x50]
jmp 0x422e8c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.InternetConnect_failed:
lea ecx, [ebp - 0x10]
mov edi, eax
call fcn.00402829
push edi
push 2
lea edx, [ebp - 0x10]
mov byte [ebp - 4], 0xa
pop ecx
call fcn.00414d4f
pop ecx
mov ecx, dword [ebp - 0x10]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov ecx, dword [ebp - 0x38]
lea ecx, [ecx - 0x10]
call fcn.00402e64
lea ecx, [esi - 0x10]
mov byte [ebp - 4], 1
call fcn.00402e64
mov esi, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x20]
jmp 0x422f45
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.InternetOpen_failed:
lea ecx, [ebp - 0x10]
mov edi, eax
call fcn.00402829
mov byte [ebp - 4], 9
push edi
jmp 0x422eca
push str.Unexpected_scheme:
lea ecx, [ebp - 0x10]
call fcn.00402829
mov byte [ebp - 4], 8
push dword [ebp - 0xcc]
push 2
lea edx, [ebp - 0x10]
pop ecx
call fcn.00414d4f
pop ecx
mov ecx, dword [ebp - 0x10]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov ecx, dword [ebp - 0x38]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov ecx, dword [ebp - 0x2c]
lea ecx, [ecx - 0x10]
call fcn.00402e64
jmp 0x422fa2
push str.InternetCrackUrl_failed:
lea ecx, [ebp - 0x10]
call fcn.00402829
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 2
lea edx, [ebp - 0x10]
pop ecx
call fcn.00414d4f
pop ecx
mov ecx, dword [ebp - 0x10]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov ecx, dword [ebp - 0x38]
lea ecx, [ecx - 0x10]
call fcn.00402e64
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x2c]
lea ecx, [ecx - 0x10]
call fcn.00402e64
cmp dword [ebp - 0x4c], 0
je 0x422f7e
push str.Direct_Download_succeeded
lea ecx, [ebp - 0x88]
call fcn.00402829
push 0
push 2
lea edx, [ebp - 0x88]
mov byte [ebp - 4], 0x19
pop ecx
call fcn.00414d4f
pop ecx
mov ecx, dword [ebp - 0x88]
lea ecx, [ecx - 0x10]
call fcn.00402e64
test edi, edi
je 0x422f89
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x422f97
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
test ebx, ebx
je 0x422fa2
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea ecx, [esi - 0x10]
call fcn.00402e64
mov eax, dword [ebp - 0x4c]
call fcn.0046c3e1
ret 0x14