Function at 0x408db0
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Set http header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49489b
mov eax, dword fs:[0]
push eax
mov eax, 0x3314
call fcn.0042fec0
mov eax, dword [0x4b50a4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ecx, dword [ebp + 0xc]
xorps xmm0, xmm0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x3230], ecx
lea ecx, [ebp - 0x210]
mov dword [ebp - 0x3260], ecx
lea ecx, [ebp - 0x1210]
movlpd qword [ebp - 0x326c], xmm0
cmp dword [eax + 0x14], 0x10
mov esi, dword [eax + 0x10]
mov dword [ebp - 0x3264], 0
movlpd qword [ebp - 0x3258], xmm0
movlpd qword [ebp - 0x3250], xmm0
mov dword [ebp - 0x3248], 0
movlpd qword [ebp - 0x323c], xmm0
mov dword [ebp - 0x3270], 0x3c
mov dword [ebp - 0x325c], 0x100
mov dword [ebp - 0x3244], ecx
mov dword [ebp - 0x3240], 0x800
jb 0x408e6a
mov edi, dword [eax]
add esi, edi
jmp 0x408e6e
add esi, eax
mov edi, eax
xor eax, eax
mov dword [ebp - 0x3228], 0
mov word [ebp - 0x3228], ax
lea ecx, [ebp - 0x3228]
mov eax, esi
mov dword [ebp - 0x3218], 0
sub eax, edi
mov dword [ebp - 0x3214], 7
push eax
call fcn.00412130
mov byte [ebp - 0x3234], 0
lea ecx, [ebp - 0x3228]
push dword [ebp - 0x3234]
push esi
push edi
call fcn.004022e0
cmp dword [ebp - 0x3214], 8
lea ecx, [ebp - 0x3270]
push ecx
push 0
push dword [ebp - 0x3218]
lea eax, [ebp - 0x3228]
mov dword [ebp - 4], 0
cmovae eax, dword [ebp - 0x3228]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x408f03
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, str.WinHttpCrackUrl_failed:
jmp 0x408f29
push 0
push 0
push 0
push 0
push str.AD_LP_0213_Microsoft_Windows_NT_10.0.19045.0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov edi, eax
test edi, edi
jne 0x408f4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, str.WinHttpOpen_failed:
push eax
push 0x4b7298
call fcn.004012e0
add esp, 8
mov ecx, eax
push esi
call fcn.00407800
push eax
call fcn.00403ca0
add esp, 4
xor bl, bl
jmp 0x4091e4
push 0
push dword [ebp - 0x3258]
push dword [ebp - 0x3260]
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ebx, eax
test ebx, ebx
jne 0x408fa1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpConnect_failed:
push 0x4b7298
call fcn.004012e0
add esp, 8
mov ecx, eax
call fcn.00407800
push eax
call fcn.00403ca0
add esp, 4
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
xor bl, bl
jmp 0x4091e4
xor eax, eax
mov ecx, 0x800000
cmp dword [ebp - 0x3264], 2
cmove eax, ecx
push eax
push 0
push 0
push 0
push dword [ebp - 0x3244]
push 0x49a7c4
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
test esi, esi
jne 0x40900d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpOpenRequest_failed:
push 0x4b7298
call fcn.004012e0
add esp, 8
mov ecx, eax
call fcn.00407800
push eax
call fcn.00403ca0
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
add esp, 4
push ebx
call esi
push edi
call esi
xor bl, bl
jmp 0x4091e4
push 0x20000000
push 0xffffffffffffffff
push str.X_Teramind_Download:_1
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
jne 0x409032
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpAddRequestHeaders_failed:
jmp 0x409070
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x409057
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpSendRequest_failed:
jmp 0x409070
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x4090a3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpReceiveResponse_failed:
push 0x4b7298
call fcn.004012e0
add esp, 8
mov ecx, eax
call fcn.00407800
push eax
call fcn.00403ca0
add esp, 4
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push ebx
call esi
push edi
call esi
xor bl, bl
jmp 0x4091e4
mov eax, dword [ebp - 0x3230]
mov ecx, eax
cmp dword [eax + 0x14], 0x10
jb 0x4090b3
mov ecx, dword [eax]
push 1
push 0x40
push 0x20
push ecx
lea ecx, [ebp - 0x3320]
call fcn.00405ac0
mov eax, dword [ebp - 0x3320]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x3320]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x3324], eax
cmp dword [ebp - 0x32d0], 0
mov byte [ebp - 4], 1
jne 0x409126
mov ecx, dword [ebp - 0x3230]
push ecx
push str.Failed_to_open_output_file:
push 0x4b7298
call fcn.004012e0
add esp, 8
push eax
call fcn.004012b0
push eax
call fcn.00403ca0
add esp, 0xc
jmp 0x4091c8
mov dword [ebp - 0x322c], 0
lea eax, [ebp - 0x322c]
push eax
push 0x2000
lea eax, [ebp - 0x3210]
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x409194
mov eax, dword [ebp - 0x322c]
test eax, eax
je 0x409176
push 0
push eax
lea eax, [ebp - 0x3210]
push eax
lea ecx, [ebp - 0x3320]
call fcn.00412e20
cmp dword [ebp - 0x322c], 0
ja 0x409130
lea ecx, [ebp - 0x3320]
call fcn.0040f4a0
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push ebx
call esi
push edi
call esi
mov bl, 1
jmp 0x4091d9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpReadData_failed:
push 0x4b7298
call fcn.004012e0
add esp, 8
mov ecx, eax
call fcn.00407800
push eax
call fcn.00403ca0
add esp, 4
lea ecx, [ebp - 0x3320]
call fcn.0040f4a0
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push ebx
call esi
push edi
call esi
xor bl, bl
lea ecx, [ebp - 0x3320]
call fcn.00407b40
mov edx, dword [ebp - 0x3214]
cmp edx, 8
jb 0x409220
mov ecx, dword [ebp - 0x3228]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x409216
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40923e
push edx
push ecx
call fcn.0042fe99
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042feac
mov esp, ebp
pop ebp
ret
call fcn.00451c51
int3