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

Disassembly:
push 0xd4
mov eax, 0x4887d9
call fcn.00464e48
mov dword [ebp - 0x34], ecx
push str.DownloadFileDirectly..._URL:
lea ecx, [ebp - 0x14]
call fcn.0040279b
mov esi, dword [ebp + 0xc]
lea edx, [ebp - 0x14]
xor ebx, ebx
push ebx
push esi
push 2
pop ecx
mov dword [ebp - 4], ebx
call fcn.00413900
or dword [ebp - 4], 0xffffffff
pop ecx
pop ecx
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov eax, dword [esi]
sub eax, 0x10
mov dword [ebp - 0x28], ebx
push eax
mov dword [ebp - 0x54], ebx
call fcn.00402d2a
pop ecx
lea esi, [eax + 0x10]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x48], esi
xor eax, eax
mov dword [ebp - 4], 1
mov dword [ebp - 0x4c], ebx
mov edi, 0x1bb
mov dword [ebp - 0x50], eax
and dword [ebp - 0x8c], 0
lea eax, [ebp - 0xdc]
push 0x3c
push 0
push eax
call fcn.00466990
xor eax, eax
add esp, 0xc
inc eax
mov dword [ebp - 0xc8], eax
mov dword [ebp - 0xac], eax
call fcn.0044afe1
push eax
lea ecx, [ebp - 0x30]
call fcn.00402824
mov byte [ebp - 4], 2
call fcn.0044afe1
push eax
lea ecx, [ebp - 0x3c]
call fcn.00402824
lea eax, [ebp - 0xdc]
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 0x422187
push dword [ebp - 0xcc]
lea ecx, [ebp - 0x30]
call fcn.004027df
push dword [ebp - 0xc8]
lea eax, [ebp - 0x90]
push eax
lea ecx, [ebp - 0x30]
call fcn.004091c9
push eax
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 5
call fcn.00402d9f
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x90]
lea ecx, [ecx - 0x10]
call fcn.00402def
push dword [ebp - 0xb0]
lea ecx, [ebp - 0x3c]
call fcn.004027df
cmp dword [ebp - 0xd0], 3
mov dword [ebp - 0x2c], 0x400200
jne 0x421a38
push 0x50
pop edi
push str.Scheme_is_HTTP
lea ecx, [ebp - 0x78]
mov dword [ebp - 0x7c], edi
call fcn.0040279b
push 0
push 2
lea edx, [ebp - 0x78]
mov byte [ebp - 4], 6
pop ecx
call fcn.00413e51
pop ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x78]
jmp 0x421a75
cmp dword [ebp - 0xd0], 4
jne 0x422114
push str.Scheme_is_HTTPs
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x7c], edi
mov dword [ebp - 0x2c], 0xc00200
call fcn.0040279b
push 0
push 2
lea edx, [ebp - 0x58]
mov byte [ebp - 4], 7
pop ecx
call fcn.00413e51
pop ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x58]
lea ecx, [ecx - 0x10]
call fcn.00402def
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 - 0x4c], eax
test eax, eax
je 0x4220d8
mov esi, dword [ebp - 0x30]
xor ecx, ecx
push ecx
push ecx
push 3
push ecx
push ecx
push edi
push esi
push eax
mov dword [ebp - 0xa0], esi
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x50], eax
test eax, eax
je 0x422088
mov edi, dword [ebp - 0x3c]
xor ecx, ecx
push ecx
push dword [ebp - 0x2c]
mov dword [ebp - 0x9c], edi
push ecx
push ecx
push ecx
push edi
push 0x4bc740
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov ebx, eax
test ebx, ebx
je 0x422037
xor esi, esi
mov dword [ebp - 0x94], 4
and dword [ebp - 0x24], esi
mov dword [ebp - 0x40], esi
jmp 0x421afe
mov esi, dword [ebp - 0x40]
and dword [ebp - 0x38], 0
push 0
push 0
push 0
push 0
push ebx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x421c35
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
lea ecx, [ebp - 0x5c]
push str.HttpSendRequest_failed:
mov dword [ebp - 0x28], edi
call fcn.0040279b
push edi
push 2
lea edx, [ebp - 0x5c]
mov byte [ebp - 4], 0xc
pop ecx
call fcn.00413e51
pop ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x5c]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov eax, dword [0x4e250c]
test eax, eax
je 0x421be0
cmp dword [0x4e2068], 0
jne 0x421be0
push 0
push 6
push edi
push ebx
push dword [eax + 0x20]
call dword [sym.imp.WININET.dll_InternetErrorDlg]
push str.User_input_...
lea ecx, [ebp - 0x60]
mov esi, eax
call fcn.0040279b
push esi
push 2
lea edx, [ebp - 0x60]
mov byte [ebp - 4], 0xd
pop ecx
call fcn.00413e51
pop ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x60]
lea ecx, [ecx - 0x10]
call fcn.00402def
cmp esi, 0x2f00
je 0x421afb
test esi, esi
jne 0x421efa
cmp edi, 0x2f19
jne 0x421efa
push 4
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0x80
push eax
push 0x1f
push ebx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
jmp 0x421afb
cmp edi, 0x2f19
jne 0x421efa
push 4
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0x80
push eax
push 0x1f
push ebx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
push str.Ignoring_error...
lea ecx, [ebp - 0x64]
call fcn.0040279b
push 0
push 2
lea edx, [ebp - 0x64]
mov byte [ebp - 4], 0xe
pop ecx
call fcn.00413e51
pop ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x64]
lea ecx, [ecx - 0x10]
call fcn.00402def
jmp 0x421afe
push 0
lea eax, [ebp - 0x94]
push eax
lea eax, [ebp - 0x24]
push eax
push 0x20000013
push ebx
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x421fc9
push str.Status_from_Direct_Downloader
lea ecx, [ebp - 0x68]
call fcn.0040279b
mov byte [ebp - 4], 0x11
lea edx, [ebp - 0x68]
push dword [ebp - 0x24]
push 2
pop ecx
call fcn.00413e51
pop ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x68]
lea ecx, [ecx - 0x10]
call fcn.00402def
cmp dword [ebp - 0x24], 0xc8
je 0x421fa3
mov edi, 0x197
cmp dword [ebp - 0x24], edi
je 0x421ca9
cmp dword [ebp - 0x24], 0x191
jne 0x421ffd
push str.Authentication_required
lea ecx, [ebp - 0x6c]
call fcn.0040279b
push 0
push 2
lea edx, [ebp - 0x6c]
mov byte [ebp - 4], 0x12
pop ecx
call fcn.00413e51
pop ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x6c]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov ecx, ebx
call fcn.004211c9
test eax, eax
je 0x421f76
call fcn.0044afe1
push eax
lea ecx, [ebp - 0x1c]
call fcn.00402824
mov byte [ebp - 4], 0x14
call fcn.0044afe1
push eax
lea ecx, [ebp - 0x44]
call fcn.00402824
mov byte [ebp - 4], 0x15
cmp esi, 2
ja 0x421e9b
mov ecx, dword [ebp - 0x34]
lea eax, [ebp - 0x44]
push 1
push eax
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ecx + 0x3c]
call fcn.0043a069
test eax, eax
je 0x421e9b
inc esi
mov dword [ebp - 0x40], esi
call fcn.0044afe1
push eax
lea ecx, [ebp - 0x18]
call fcn.00402824
lea edx, [ebp - 0x18]
mov byte [ebp - 4], 0x17
lea ecx, [ebp - 0x44]
call fcn.004456b3
test eax, eax
je 0x421dfc
cmp dword [ebp - 0x24], edi
mov edi, dword [ebp - 0x1c]
mov esi, dword [edi - 0xc]
jne 0x421da9
cmp dword [edi - 4], 1
jle 0x421d76
push esi
lea ecx, [ebp - 0x1c]
call fcn.00402a37
mov edi, dword [ebp - 0x1c]
lea eax, [esi + 1]
push eax
push edi
push 0x2b
push ebx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov esi, dword [ebp - 0x18]
cmp dword [esi - 4], 1
mov eax, dword [esi - 0xc]
mov dword [ebp - 0x38], eax
jle 0x421da2
push eax
lea ecx, [ebp - 0x18]
call fcn.00402a37
mov esi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x38]
inc eax
push eax
push esi
push 0x2c
jmp 0x421dec
cmp dword [edi - 4], 1
jle 0x421dbb
push esi
lea ecx, [ebp - 0x1c]
call fcn.00402a37
mov edi, dword [ebp - 0x1c]
lea eax, [esi + 1]
push eax
push edi
push 0x1c
push ebx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov esi, dword [ebp - 0x18]
cmp dword [esi - 4], 1
mov eax, dword [esi - 0xc]
mov dword [ebp - 0x38], eax
jle 0x421de7
push eax
lea ecx, [ebp - 0x18]
call fcn.00402a37
mov esi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x38]
inc eax
push eax
push esi
push 0x1d
push ebx
call dword [sym.imp.WININET.dll_InternetSetOptionW]
mov dword [ebp - 0x38], 1
jmp 0x421e38
mov eax, 0x1771
lea ecx, [ebp - 0x70]
push str.Decryption_failed
mov dword [ebp - 0x28], eax
call fcn.0040279b
push 0
push 2
lea edx, [ebp - 0x70]
mov byte [ebp - 4], 0x18
pop ecx
call fcn.00413e51
pop ecx
mov byte [ebp - 4], 0x17
mov ecx, dword [ebp - 0x70]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov edi, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
cmp dword [esi - 4], 1
mov ecx, dword [esi - 0xc]
mov dword [ebp - 0x98], ecx
jle 0x421e59
push ecx
lea ecx, [ebp - 0x18]
call fcn.00402a37
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x98]
mov eax, esi
test ecx, ecx
je 0x421e68
mov byte [eax], 0
inc eax
sub ecx, 1
jne 0x421e5f
push 0xffffffffffffffff
lea ecx, [ebp - 0x18]
call fcn.004097d8
push 0xffffffffffffffff
lea ecx, [ebp - 0x1c]
call fcn.004097d8
lea ecx, [esi - 0x10]
call fcn.00402def
mov ecx, dword [ebp - 0x44]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov esi, dword [ebp - 0x40]
lea ecx, [edi - 0x10]
mov byte [ebp - 4], 3
jmp 0x421ee6
mov ecx, str.Failed_to_get_CRDs:
cmp esi, 2
mov eax, str.Limit_getting_CRDs_reached
cmovbe eax, ecx
lea ecx, [ebp - 0x74]
push eax
call fcn.0040279b
push 0
push 2
lea edx, [ebp - 0x74]
mov byte [ebp - 4], 0x16
pop ecx
call fcn.00413e51
pop ecx
mov ecx, dword [ebp - 0x74]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov ecx, dword [ebp - 0x44]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.00402def
cmp dword [ebp - 0x38], 0
jne 0x421afe
jmp 0x421ffd
mov edi, 0x1bb
cmp di, word [ebp - 0x7c]
jne 0x422002
mov ecx, dword [ebp - 0x34]
lea eax, [ebp - 0x48]
push eax
push dword [ebp + 8]
call fcn.0041e6a8
test eax, eax
je 0x421f6b
push str.Switching_scheme
lea ecx, [ebp - 0x80]
call fcn.0040279b
push 0
push 2
lea edx, [ebp - 0x80]
mov byte [ebp - 4], 0xf
pop ecx
call fcn.00413e51
pop ecx
mov ecx, dword [ebp - 0x80]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov eax, dword [ebp - 0x4c]
push eax
mov dword [ebp - 0x8c], 1
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov esi, dword [ebp - 0x48]
mov dword [ebp - 0x20], esi
jmp 0x422005
push str.No_CRDs_required
lea ecx, [ebp - 0x84]
call fcn.0040279b
push 0
push 2
lea edx, [ebp - 0x84]
mov byte [ebp - 4], 0x13
pop ecx
call fcn.00413e51
pop ecx
mov ecx, dword [ebp - 0x84]
jmp 0x421ff5
test esi, esi
je 0x421fb2
mov ecx, dword [ebp - 0x34]
lea ecx, [ecx + 0x3c]
call fcn.00439f02
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 8]
push ebx
call fcn.00421409
mov dword [ebp - 0x54], eax
jmp 0x421ffd
push str.HttpQueryInfo_failed:
lea ecx, [ebp - 0x88]
call fcn.0040279b
mov byte [ebp - 4], 0x10
lea edx, [ebp - 0x88]
push dword [ebp - 0x24]
push 2
pop ecx
call fcn.00413e51
pop ecx
mov ecx, dword [ebp - 0x88]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov edi, 0x1bb
mov esi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x9c]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0xa0]
lea ecx, [ecx - 0x10]
call fcn.00402def
cmp dword [ebp - 0x8c], 0
jne 0x421942
jmp 0x4221d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.HttpOpenRequest_failed:
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x28], eax
call fcn.0040279b
mov eax, dword [ebp - 0x28]
lea edx, [ebp - 0x14]
push eax
push 2
pop ecx
mov byte [ebp - 4], 0xb
call fcn.00413e51
pop ecx
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.00402def
lea ecx, [edi - 0x10]
call fcn.00402def
lea ecx, [esi - 0x10]
mov byte [ebp - 4], 1
call fcn.00402def
mov esi, dword [ebp - 0x20]
jmp 0x4221d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.InternetConnect_failed:
lea ecx, [ebp - 0x14]
mov edi, eax
call fcn.0040279b
push edi
push 2
lea edx, [ebp - 0x14]
mov byte [ebp - 4], 0xa
pop ecx
call fcn.00413e51
pop ecx
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov ecx, dword [ebp - 0x3c]
lea ecx, [ecx - 0x10]
call fcn.00402def
lea ecx, [esi - 0x10]
mov byte [ebp - 4], 1
call fcn.00402def
mov esi, dword [ebp - 0x20]
jmp 0x4221d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.InternetOpen_failed:
lea ecx, [ebp - 0x14]
mov edi, eax
call fcn.0040279b
push edi
push 2
lea edx, [ebp - 0x14]
mov byte [ebp - 4], 9
pop ecx
call fcn.00413e51
pop ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.00402def
lea eax, [ebp - 0xd]
push eax
push edi
jmp 0x42214c
push str.Unexpected_scheme:
lea ecx, [ebp - 0x14]
call fcn.0040279b
mov byte [ebp - 4], 8
lea edx, [ebp - 0x14]
push dword [ebp - 0xd0]
push 2
pop ecx
call fcn.00413e51
pop ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.00402def
lea eax, [ebp - 0xd]
push eax
push 0xffffffffffffffff
cmp dword [ebp + 0x1c], 0
mov ecx, str.Backup_BITs_Result_Payloads
mov eax, str.Backup_BITs_Result
mov byte [ebp - 0xd], 0
cmove eax, ecx
mov ecx, 0x4e1f90
push eax
call fcn.004098f0
mov ecx, dword [ebp - 0x3c]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov ecx, dword [ebp - 0x30]
lea ecx, [ecx - 0x10]
call fcn.00402def
jmp 0x422255
push str.InternetCrackUrl_failed:
lea ecx, [ebp - 0x14]
call fcn.0040279b
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 2
lea edx, [ebp - 0x14]
pop ecx
call fcn.00413e51
pop ecx
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov ecx, dword [ebp - 0x3c]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x30]
lea ecx, [ecx - 0x10]
call fcn.00402def
mov edi, dword [ebp - 0x28]
cmp dword [ebp - 0x54], 0
je 0x422209
push str.Direct_Download_succeeded
lea ecx, [ebp - 0x34]
call fcn.0040279b
push 0
push 2
lea edx, [ebp - 0x34]
mov byte [ebp - 4], 0x19
pop ecx
call fcn.00413e51
pop ecx
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x34]
lea ecx, [ecx - 0x10]
call fcn.00402def
xor edi, edi
cmp dword [ebp + 0x1c], 0
lea eax, [ebp - 0xd]
push eax
mov ecx, str.Backup_BITs_Result_Payloads
mov byte [ebp - 0xd], 0
mov eax, str.Backup_BITs_Result
cmove eax, ecx
mov ecx, 0x4e1f90
push edi
push eax
call fcn.004098f0
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x42223c
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x42224a
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
test ebx, ebx
je 0x422255
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea ecx, [esi - 0x10]
call fcn.00402def
mov eax, dword [ebp - 0x54]
call fcn.00464e11
ret 0x18