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

Disassembly:
push 0xd8
mov eax, 0x46a708
call fcn.004508b2
push str.DownloadFileDirectly..._URL:
lea ecx, [ebp - 0x5c]
call fcn.004012e2
xor ebx, ebx
push ebx
mov dword [ebp - 4], ebx
push dword [ebp + 0x10]
lea eax, [ebp - 0x5c]
push eax
push 2
pop edi
push edi
call fcn.00410886
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x5c]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.004017ba
push dword [ebp + 0x10]
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x30], ebx
call fcn.00401326
xor esi, esi
inc esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x38], ebx
push 0x38
lea eax, [ebp - 0xdc]
push ebx
push eax
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0xe0], ebx
call fcn.0044e740
add esp, 0xc
mov dword [ebp - 0xcc], esi
mov dword [ebp - 0xb0], esi
mov esi, dword [ebp - 0x3c]
mov eax, dword [esi - 0xc]
lea ecx, [ebp - 0xe0]
push ecx
push ebx
push eax
push esi
call dword [sym.imp.WININET.dll_InternetCrackUrlW]
test eax, eax
je 0x419f3f
push dword [ebp - 0xcc]
lea ecx, [ebp - 0x44]
push dword [ebp - 0xd0]
call fcn.0041b93b
mov byte [ebp - 4], 3
push dword [ebp - 0xb0]
lea ecx, [ebp - 0x28]
push dword [ebp - 0xb4]
call fcn.0041b93b
mov byte [ebp - 4], 4
cmp dword [ebp - 0xd4], 3
mov dword [ebp - 0x2c], 0x400200
jne 0x4199cc
push str.Scheme_is_HTTP
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x4c], 0x50
call fcn.004012e2
push ebx
lea eax, [ebp - 0x94]
push eax
push edi
mov byte [ebp - 4], 5
call fcn.00410d56
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x94]
jmp 0x419a0a
cmp dword [ebp - 0xd4], 4
jne 0x41a103
push str.Scheme_is_HTTPs
lea ecx, [ebp - 0x50]
mov dword [ebp - 0x4c], 0x1bb
mov dword [ebp - 0x2c], 0xc00200
call fcn.004012e2
push ebx
lea eax, [ebp - 0x50]
push eax
push edi
mov byte [ebp - 4], 6
call fcn.00410d56
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x50]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004017ba
push ebx
push ebx
push ebx
push ebx
push str.ARM_WinINet_Downloader
call dword [sym.imp.WININET.dll_InternetOpenW]
mov dword [ebp - 0x34], eax
cmp eax, ebx
je 0x419f73
mov esi, dword [ebp - 0x44]
push ebx
push ebx
push 3
push ebx
push ebx
push dword [ebp - 0x4c]
push esi
push eax
call dword [sym.imp.WININET.dll_InternetConnectW]
mov dword [ebp - 0x38], eax
cmp eax, ebx
je 0x419fec
push ebx
push dword [ebp - 0x2c]
push ebx
push ebx
push ebx
push dword [ebp - 0x28]
push 0x490c40
push eax
call dword [sym.imp.WININET.dll_HttpOpenRequestW]
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x41a018
mov dword [ebp - 0x48], 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 0x419bcd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push str.HttpSendRequest_failed:
lea ecx, [ebp - 0x84]
mov dword [ebp - 0x18], esi
call fcn.004012e2
push esi
lea eax, [ebp - 0x84]
push eax
push edi
mov byte [ebp - 4], 0xb
call fcn.00410d56
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x84]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004017ba
mov eax, dword [0x4b2bec]
cmp eax, ebx
je 0x419b6d
cmp dword [0x4b2788], ebx
jne 0x419b6d
mov eax, dword [eax + 0x20]
push ebx
push 6
push esi
push dword [ebp - 0x10]
push eax
call dword [sym.imp.WININET.dll_InternetErrorDlg]
push str.User_input_...
lea ecx, [ebp - 0x64]
mov esi, eax
call fcn.004012e2
push esi
lea eax, [ebp - 0x64]
push eax
push edi
mov byte [ebp - 4], 0xc
call fcn.00410d56
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x64]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004017ba
cmp esi, 0x2f00
je 0x419a7f
cmp esi, ebx
jne 0x419e7e
cmp dword [ebp - 0x18], 0x2f19
jne 0x419e7e
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 0x419a7f
cmp esi, 0x2f19
jne 0x419e7e
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.004012e2
push ebx
lea eax, [ebp - 0xa0]
push eax
push edi
mov byte [ebp - 4], 0xd
call fcn.00410d56
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0xa0]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004017ba
jmp 0x419a7f
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 0x419ee8
push str.Status_from_Direct_Downloader
lea ecx, [ebp - 0x6c]
call fcn.004012e2
mov byte [ebp - 4], 0x10
push dword [ebp - 0x24]
lea eax, [ebp - 0x6c]
push eax
push edi
call fcn.00410d56
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x6c]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004017ba
cmp dword [ebp - 0x24], 0xc8
je 0x419e2e
mov esi, 0x197
cmp dword [ebp - 0x24], esi
je 0x419c43
cmp dword [ebp - 0x24], 0x191
jne 0x419f14
push str.Authentication_required
lea ecx, [ebp - 0x8c]
call fcn.004012e2
push ebx
lea eax, [ebp - 0x8c]
push eax
push edi
mov byte [ebp - 4], 0x11
call fcn.00410d56
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x8c]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004017ba
push dword [ebp - 0x10]
call fcn.00419227
pop ecx
test eax, eax
je 0x419e5a
call fcn.0043ce9a
push eax
lea ecx, [ebp - 0x1c]
call fcn.00413a25
mov byte [ebp - 4], 0x13
call fcn.0043ce9a
push eax
lea ecx, [ebp - 0x40]
call fcn.00413a25
mov byte [ebp - 4], 0x14
cmp dword [ebp - 0x48], edi
ja 0x419dcb
mov ecx, dword [ebp + 8]
push 1
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x1c]
push eax
add ecx, 0x38
call fcn.0042d55e
test eax, eax
je 0x419dd2
inc dword [ebp - 0x48]
call fcn.0043ce9a
push eax
lea ecx, [ebp - 0x14]
call fcn.00413a25
lea ecx, [ebp - 0x14]
lea edx, [ebp - 0x40]
mov byte [ebp - 4], 0x16
call fcn.00438465
test eax, eax
je 0x419d65
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax - 0xc]
inc eax
lea ecx, [ebp - 0x1c]
push eax
cmp dword [ebp - 0x24], esi
jne 0x419d31
call fcn.0040f23b
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push eax
push 0x2b
push dword [ebp - 0x10]
call esi
mov eax, dword [ebp - 0x14]
mov eax, dword [eax - 0xc]
inc eax
push eax
lea ecx, [ebp - 0x14]
call fcn.0040f23b
push eax
push 0x2c
jmp 0x419d57
call fcn.0040f23b
mov esi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push eax
push 0x1c
push dword [ebp - 0x10]
call esi
mov eax, dword [ebp - 0x14]
mov eax, dword [eax - 0xc]
inc eax
push eax
lea ecx, [ebp - 0x14]
call fcn.0040f23b
push eax
push 0x1d
push dword [ebp - 0x10]
call esi
mov dword [ebp - 0x7c], 1
jmp 0x419d9a
push str.Decryption_failed
lea ecx, [ebp - 0x74]
mov dword [ebp - 0x18], 0x1771
call fcn.004012e2
push ebx
lea eax, [ebp - 0x74]
push eax
push edi
mov byte [ebp - 4], 0x17
call fcn.00410d56
mov byte [ebp - 4], 0x16
mov ecx, dword [ebp - 0x74]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004017ba
mov eax, dword [ebp - 0x14]
mov esi, dword [eax - 0xc]
lea ecx, [ebp - 0x14]
call fcn.0040f23b
cmp esi, ebx
je 0x419db2
mov byte [eax], bl
inc eax
dec esi
jne 0x419dac
push 0xffffffffffffffff
lea ecx, [ebp - 0x14]
call fcn.00409da3
push 0xffffffffffffffff
lea ecx, [ebp - 0x1c]
call fcn.00409da3
mov ecx, dword [ebp - 0x14]
jmp 0x419dfe
mov eax, str.Limit_getting_CRDs_reached
jmp 0x419dd7
mov eax, str.Failed_to_get_CRDs:
push eax
lea ecx, [ebp - 0x9c]
call fcn.004012e2
push ebx
lea eax, [ebp - 0x9c]
push eax
push edi
mov byte [ebp - 4], 0x15
call fcn.00410d56
mov ecx, dword [ebp - 0x9c]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004017ba
mov ecx, dword [ebp - 0x40]
add ecx, 0xfffffff0
call fcn.004017ba
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.004017ba
cmp dword [ebp - 0x7c], ebx
jne 0x419a7f
jmp 0x419f14
cmp dword [ebp - 0x48], ebx
je 0x419e3e
mov ecx, dword [ebp + 8]
add ecx, 0x38
call fcn.0042d3f3
push dword [ebp + 0x1c]
mov ecx, dword [ebp + 0xc]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp - 0x10]
call fcn.004193fb
mov dword [ebp - 0x30], eax
jmp 0x419f14
push str.No_CRDs_required
lea ecx, [ebp - 0x54]
call fcn.004012e2
push ebx
lea eax, [ebp - 0x54]
push eax
push edi
mov byte [ebp - 4], 0x12
call fcn.00410d56
mov ecx, dword [ebp - 0x54]
jmp 0x419f09
mov eax, 0x1bb
cmp ax, word [ebp - 0x4c]
jne 0x419f14
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x3c]
push eax
call fcn.004171b2
test eax, eax
je 0x419f14
push str.Switching_scheme
lea ecx, [ebp - 0x58]
call fcn.004012e2
push ebx
lea eax, [ebp - 0x58]
push eax
push edi
mov byte [ebp - 4], 0xe
call fcn.00410d56
mov ecx, dword [ebp - 0x58]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004017ba
push dword [ebp - 0x34]
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebp - 0x68], 1
call esi
push dword [ebp - 0x38]
call esi
push dword [ebp - 0x10]
call esi
jmp 0x419f14
push str.HttpQueryInfo_failed:
lea ecx, [ebp - 0x60]
call fcn.004012e2
mov byte [ebp - 4], 0xf
push dword [ebp - 0x24]
lea eax, [ebp - 0x60]
push eax
push edi
call fcn.00410d56
mov ecx, dword [ebp - 0x60]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004017ba
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.004017ba
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x44]
add ecx, 0xfffffff0
call fcn.004017ba
cmp dword [ebp - 0x68], ebx
je 0x41a06d
xor esi, esi
inc esi
jmp 0x419912
push str.InternetCrackUrl_failed:
lea ecx, [ebp - 0x70]
call fcn.004012e2
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x70]
push eax
push edi
call fcn.00410d56
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x70]
add esp, 0xc
add ecx, 0xfffffff0
jmp 0x41a068
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.InternetOpen_failed:
lea ecx, [ebp - 0x78]
mov esi, eax
call fcn.004012e2
push esi
lea eax, [ebp - 0x78]
push eax
push edi
mov byte [ebp - 4], 8
call fcn.00410d56
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x78]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004017ba
mov byte [ebp + 0x13], bl
mov eax, str.Backup_BITs_Result
cmp dword [ebp + 0x20], ebx
jne 0x419fbb
mov eax, str.Backup_BITs_Result_Payloads
lea ecx, [ebp + 0x13]
push ecx
push esi
push eax
mov ecx, 0x4b26d8
call fcn.00406c2e
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.004017ba
mov ecx, dword [ebp - 0x44]
add ecx, 0xfffffff0
call fcn.004017ba
mov ecx, dword [ebp - 0x3c]
add ecx, 0xfffffff0
jmp 0x41a17b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.InternetConnect_failed:
lea ecx, [ebp - 0x80]
mov dword [ebp - 0x18], eax
call fcn.004012e2
push dword [ebp - 0x18]
lea eax, [ebp - 0x80]
push eax
push edi
mov byte [ebp - 4], 9
call fcn.00410d56
mov ecx, dword [ebp - 0x80]
jmp 0x41a04b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.HttpOpenRequest_failed:
lea ecx, [ebp - 0x88]
mov dword [ebp - 0x18], eax
call fcn.004012e2
push dword [ebp - 0x18]
lea eax, [ebp - 0x88]
push eax
push edi
mov byte [ebp - 4], 0xa
call fcn.00410d56
mov ecx, dword [ebp - 0x88]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004017ba
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.004017ba
lea ecx, [esi - 0x10]
mov byte [ebp - 4], 1
call fcn.004017ba
cmp dword [ebp - 0x30], ebx
je 0x41a0ac
push str.Direct_Download_succeeded
lea ecx, [ebp - 0x90]
call fcn.004012e2
push ebx
lea eax, [ebp - 0x90]
push eax
push edi
mov byte [ebp - 4], 0x18
call fcn.00410d56
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x90]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004017ba
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x1e], bl
mov eax, str.Backup_BITs_Result
cmp dword [ebp + 0x20], ebx
jne 0x41a0be
mov eax, str.Backup_BITs_Result_Payloads
lea ecx, [ebp - 0x1e]
push ecx
push dword [ebp - 0x18]
mov ecx, 0x4b26d8
push eax
call fcn.00406c2e
cmp dword [ebp - 0x34], ebx
je 0x41a0de
push dword [ebp - 0x34]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x38], ebx
je 0x41a0ec
push dword [ebp - 0x38]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
cmp dword [ebp - 0x10], ebx
je 0x419fe1
push dword [ebp - 0x10]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x419fe1
push str.Unexpected_scheme:
lea ecx, [ebp - 0x98]
call fcn.004012e2
mov byte [ebp - 4], 7
push dword [ebp - 0xd4]
lea eax, [ebp - 0x98]
push eax
push edi
call fcn.00410d56
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x98]
add esp, 0xc
add ecx, 0xfffffff0
call fcn.004017ba
mov byte [ebp - 0x1d], bl
mov eax, str.Backup_BITs_Result
cmp dword [ebp + 0x20], ebx
jne 0x41a151
mov eax, str.Backup_BITs_Result_Payloads
lea ecx, [ebp - 0x1d]
push ecx
push 0xffffffffffffffff
push eax
mov ecx, 0x4b26d8
call fcn.00406c2e
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.004017ba
mov ecx, dword [ebp - 0x44]
add ecx, 0xfffffff0
call fcn.004017ba
lea ecx, [esi - 0x10]
call fcn.004017ba
mov eax, dword [ebp - 0x30]
call fcn.0045098a
ret 0x1c