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

Disassembly:
push 0xd8
mov eax, 0x477475
call fcn.0045be74
push str.DownloadFileDirectly..._URL:
lea ecx, [ebp - 0x5c]
call fcn.004020a6
xor ebx, ebx
push ebx
mov dword [ebp - 4], ebx
push dword [ebp + 0x10]
lea eax, [ebp - 0x5c]
push eax
push 2
pop esi
push esi
call fcn.00414e01
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x5c]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004025d2
push dword [ebp + 0x10]
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x34], ebx
call fcn.004020ea
xor edi, edi
inc edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x3c], ebx
push 0x38
lea eax, [ebp - 0xdc]
push ebx
push eax
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0xe0], ebx
call fcn.00459cf0
mov ecx, dword [ebp - 0x30]
add esp, 0xc
lea edx, [ebp - 0xe0]
push edx
mov dword [ebp - 0xcc], edi
mov dword [ebp - 0xb0], edi
mov eax, dword [ecx - 0xc]
push ebx
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
je 0x42091e
push dword [ebp - 0xcc]
lea ecx, [ebp - 0x44]
push dword [ebp - 0xd0]
call fcn.0042276b
mov byte [ebp - 4], 3
push dword [ebp - 0xb0]
lea ecx, [ebp - 0x28]
push dword [ebp - 0xb4]
call fcn.0042276b
mov byte [ebp - 4], 4
cmp dword [ebp - 0xd4], 3
mov dword [ebp - 0x2c], 0x400200
jne 0x4203aa
push str.Scheme_is_HTTP
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x4c], 0x50
call fcn.004020a6
push ebx
lea eax, [ebp - 0x94]
push eax
push esi
mov byte [ebp - 4], 5
call fcn.004152d1
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x94]
jmp 0x4203e8
cmp dword [ebp - 0xd4], 4
jne 0x420ab7
push str.Scheme_is_HTTPs
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x4c], 0x1bb
mov dword [ebp - 0x2c], 0xc00200
call fcn.004020a6
push ebx
lea eax, [ebp - 0x50]
push eax
push esi
mov byte [ebp - 4], 6
call fcn.004152d1
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x50]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025d2
push ebx
push ebx
push ebx
push ebx
push str.ARM_WinINet_Downloader
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x48], eax
cmp eax, ebx
je 0x420952
mov edi, dword [ebp - 0x44]
push ebx
push ebx
push 3
push ebx
push ebx
push dword [ebp - 0x4c]
push edi
push eax
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x3c], eax
cmp eax, ebx
je 0x4209a6
push ebx
push dword [ebp - 0x2c]
push ebx
push ebx
push ebx
push dword [ebp - 0x28]
push 0x4a01a8
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x4209d2
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0xa4], 4
push ebx
push ebx
push ebx
push ebx
push dword [ebp - 0x10]
mov dword [ebp - 0x7c], ebx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x4205ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push str.HttpSendRequest_failed:
lea ecx, [ebp - 0x84]
mov dword [ebp - 0x18], edi
call fcn.004020a6
push edi
lea eax, [ebp - 0x84]
push eax
push esi
mov byte [ebp - 4], 0xb
call fcn.004152d1
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x84]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025d2
mov eax, dword [0x4c4c30]
cmp eax, ebx
je 0x42054b
cmp dword [0x4c4798], ebx
jne 0x42054b
mov eax, dword [eax + 0x20]
push ebx
push 6
push edi
push dword [ebp - 0x10]
push eax
call dword [sym.imp.WININET.dll_InternetErrorDlg]
push str.User_input_...
lea ecx, [ebp - 0x64]
mov edi, eax
call fcn.004020a6
push edi
lea eax, [ebp - 0x64]
push eax
push esi
mov byte [ebp - 4], 0xc
call fcn.004152d1
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x64]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025d2
cmp edi, 0x2f00
je 0x42045d
cmp edi, ebx
jne 0x42085d
cmp dword [ebp - 0x18], 0x2f19
jne 0x42085d
push 4
lea eax, [ebp - 0x2c]
push eax
push 0x1f
push dword [ebp - 0x10]
mov dword [ebp - 0x2c], 0x80
call dword [sym.imp.WININET.dll_InternetSetOptionW]
jmp 0x42045d
cmp edi, 0x2f19
jne 0x42085d
push 4
lea eax, [ebp - 0x2c]
push eax
push 0x1f
push dword [ebp - 0x10]
mov dword [ebp - 0x2c], 0x80
call dword [sym.imp.WININET.dll_InternetSetOptionW]
push str.Ignoring_error...
lea ecx, [ebp - 0xa0]
call fcn.004020a6
push ebx
lea eax, [ebp - 0xa0]
push eax
push esi
mov byte [ebp - 4], 0xd
call fcn.004152d1
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0xa0]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025d2
jmp 0x42045d
push ebx
lea eax, [ebp - 0xa4]
push eax
lea eax, [ebp - 0x24]
push eax
push 0x20000013
push dword [ebp - 0x10]
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x4208c7
push str.Status_from_Direct_Downloader
lea ecx, [ebp - 0x6c]
call fcn.004020a6
mov byte [ebp - 4], 0x10
push dword [ebp - 0x24]
lea eax, [ebp - 0x6c]
push eax
push esi
call fcn.004152d1
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x6c]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025d2
cmp dword [ebp - 0x24], 0xc8
je 0x42080d
mov edi, 0x197
cmp dword [ebp - 0x24], edi
je 0x420621
cmp dword [ebp - 0x24], 0x191
jne 0x4208f3
push str.Authentication_required
lea ecx, [ebp - 0x8c]
call fcn.004020a6
push ebx
lea eax, [ebp - 0x8c]
push eax
push esi
mov byte [ebp - 4], 0x11
call fcn.004152d1
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x8c]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025d2
push dword [ebp - 0x10]
call fcn.0041fbd4
pop ecx
test eax, eax
je 0x420839
call fcn.0044825c
push eax
lea ecx, [ebp - 0x1c]
call fcn.0041872d
mov byte [ebp - 4], 0x13
call fcn.0044825c
push eax
lea ecx, [ebp - 0x40]
call fcn.0041872d
mov byte [ebp - 4], 0x14
cmp dword [ebp - 0x38], esi
ja 0x4207aa
push 1
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp + 8]
add eax, 0x3c
push eax
call fcn.004376c8
test eax, eax
je 0x4207b1
inc dword [ebp - 0x38]
call fcn.0044825c
push eax
lea ecx, [ebp - 0x14]
call fcn.0041872d
lea ecx, [ebp - 0x14]
lea edx, [ebp - 0x40]
mov byte [ebp - 4], 0x16
call fcn.004431b7
test eax, eax
je 0x420744
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax - 0xc]
inc eax
lea ecx, [ebp - 0x1c]
push eax
cmp dword [ebp - 0x24], edi
jne 0x420710
call fcn.004137b1
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push eax
push 0x2b
push dword [ebp - 0x10]
call edi
mov eax, dword [ebp - 0x14]
mov eax, dword [eax - 0xc]
inc eax
push eax
lea ecx, [ebp - 0x14]
call fcn.004137b1
push eax
push 0x2c
jmp 0x420736
call fcn.004137b1
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push eax
push 0x1c
push dword [ebp - 0x10]
call edi
mov eax, dword [ebp - 0x14]
mov eax, dword [eax - 0xc]
inc eax
push eax
lea ecx, [ebp - 0x14]
call fcn.004137b1
push eax
push 0x1d
push dword [ebp - 0x10]
call edi
mov dword [ebp - 0x7c], 1
jmp 0x420779
push str.Decryption_failed
lea ecx, [ebp - 0x74]
mov dword [ebp - 0x18], 0x1771
call fcn.004020a6
push ebx
lea eax, [ebp - 0x74]
push eax
push esi
mov byte [ebp - 4], 0x17
call fcn.004152d1
mov byte [ebp - 4], 0x16
mov ecx, dword [ebp - 0x74]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025d2
mov eax, dword [ebp - 0x14]
mov edi, dword [eax - 0xc]
lea ecx, [ebp - 0x14]
call fcn.004137b1
cmp edi, ebx
je 0x420791
mov byte [eax], bl
inc eax
dec edi
jne 0x42078b
push 0xffffffffffffffff
lea ecx, [ebp - 0x14]
call fcn.0040b00b
push 0xffffffffffffffff
lea ecx, [ebp - 0x1c]
call fcn.0040b00b
mov ecx, dword [ebp - 0x14]
jmp 0x4207dd
mov eax, str.Limit_getting_CRDs_reached
jmp 0x4207b6
mov eax, str.Failed_to_get_CRDs:
push eax
lea ecx, [ebp - 0x9c]
call fcn.004020a6
push ebx
lea eax, [ebp - 0x9c]
push eax
push esi
mov byte [ebp - 4], 0x15
call fcn.004152d1
mov ecx, dword [ebp - 0x9c]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025d2
mov ecx, dword [ebp - 0x40]
add ecx, 0xfffffff0
call fcn.004025d2
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.004025d2
cmp dword [ebp - 0x7c], ebx
jne 0x42045d
jmp 0x4208f3
cmp dword [ebp - 0x38], ebx
je 0x42081d
mov ecx, dword [ebp + 8]
add ecx, 0x3c
call fcn.0043755d
push dword [ebp + 0x1c]
mov ecx, dword [ebp + 0xc]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp - 0x10]
call fcn.0041fddb
mov dword [ebp - 0x34], eax
jmp 0x4208f3
push str.No_CRDs_required
lea ecx, [ebp - 0x54]
call fcn.004020a6
push ebx
lea eax, [ebp - 0x54]
push eax
push esi
mov byte [ebp - 4], 0x12
call fcn.004152d1
mov ecx, dword [ebp - 0x54]
jmp 0x4208e8
mov eax, 0x1bb
cmp ax, word [ebp - 0x4c]
jne 0x4208f3
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x30]
push eax
call fcn.0041d4b5
test eax, eax
je 0x4208f3
push str.Switching_scheme
lea ecx, [ebp - 0x58]
call fcn.004020a6
push ebx
lea eax, [ebp - 0x58]
push eax
push esi
mov byte [ebp - 4], 0xe
call fcn.004152d1
mov ecx, dword [ebp - 0x58]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025d2
push dword [ebp - 0x48]
mov edi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x68], 1
call edi
push dword [ebp - 0x3c]
call edi
push dword [ebp - 0x10]
call edi
jmp 0x4208f3
push str.HttpQueryInfo_failed:
lea ecx, [ebp - 0x60]
call fcn.004020a6
mov byte [ebp - 4], 0xf
push dword [ebp - 0x24]
lea eax, [ebp - 0x60]
push eax
push esi
call fcn.004152d1
mov ecx, dword [ebp - 0x60]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025d2
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.004025d2
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x44]
add ecx, 0xfffffff0
call fcn.004025d2
cmp dword [ebp - 0x68], ebx
je 0x420a27
xor edi, edi
inc edi
jmp 0x4202f0
push str.InternetCrackUrl_failed:
lea ecx, [ebp - 0x70]
call fcn.004020a6
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x70]
push eax
push esi
call fcn.004152d1
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x70]
add esp, 0xc
add ecx, 0xfffffff0
jmp 0x420a22
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.InternetOpen_failed:
lea ecx, [ebp - 0x78]
mov edi, eax
call fcn.004020a6
push edi
lea eax, [ebp - 0x78]
push eax
push esi
mov byte [ebp - 4], 8
call fcn.004152d1
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x78]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025d2
mov byte [ebp + 0x13], bl
mov eax, str.Backup_BITs_Result
cmp dword [ebp + 0x20], ebx
jne 0x42099a
mov eax, str.Backup_BITs_Result_Payloads
lea ecx, [ebp + 0x13]
push ecx
push edi
mov edi, eax
jmp 0x420b0b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.InternetConnect_failed:
lea ecx, [ebp - 0x80]
mov dword [ebp - 0x18], eax
call fcn.004020a6
push dword [ebp - 0x18]
lea eax, [ebp - 0x80]
push eax
push esi
mov byte [ebp - 4], 9
call fcn.004152d1
mov ecx, dword [ebp - 0x80]
jmp 0x420a05
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.HttpOpenRequest_failed:
lea ecx, [ebp - 0x88]
mov dword [ebp - 0x18], eax
call fcn.004020a6
push dword [ebp - 0x18]
lea eax, [ebp - 0x88]
push eax
push esi
mov byte [ebp - 4], 0xa
call fcn.004152d1
mov ecx, dword [ebp - 0x88]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025d2
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.004025d2
lea ecx, [edi - 0x10]
mov byte [ebp - 4], 1
call fcn.004025d2
cmp dword [ebp - 0x34], ebx
je 0x420a66
push str.Direct_Download_succeeded
lea ecx, [ebp - 0x90]
call fcn.004020a6
push ebx
lea eax, [ebp - 0x90]
push eax
push esi
mov byte [ebp - 4], 0x18
call fcn.004152d1
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x90]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025d2
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x1e], bl
mov edi, str.Backup_BITs_Result
cmp dword [ebp + 0x20], ebx
jne 0x420a78
mov edi, str.Backup_BITs_Result_Payloads
lea eax, [ebp - 0x1e]
push eax
push dword [ebp - 0x18]
mov ebx, 0x4c46e8
call fcn.0040b14d
xor esi, esi
cmp dword [ebp - 0x48], esi
je 0x420a99
push dword [ebp - 0x48]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x3c], esi
je 0x420aa7
push dword [ebp - 0x3c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x10], esi
je 0x420b2b
push dword [ebp - 0x10]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x420b2b
push str.Unexpected_scheme:
lea ecx, [ebp - 0x98]
call fcn.004020a6
mov byte [ebp - 4], 7
push dword [ebp - 0xd4]
lea eax, [ebp - 0x98]
push eax
push esi
call fcn.004152d1
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x98]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004025d2
mov byte [ebp - 0x1d], bl
mov edi, str.Backup_BITs_Result
cmp dword [ebp + 0x20], ebx
jne 0x420b05
mov edi, str.Backup_BITs_Result_Payloads
lea eax, [ebp - 0x1d]
push eax
push 0xffffffffffffffff
mov ebx, 0x4c46e8
call fcn.0040b14d
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.004025d2
mov ecx, dword [ebp - 0x44]
add ecx, 0xfffffff0
call fcn.004025d2
mov ecx, dword [ebp - 0x30]
add ecx, 0xfffffff0
call fcn.004025d2
mov eax, dword [ebp - 0x34]
call fcn.0045bf4c
ret 0x1c