Function at 0x405070
Capabilities:
Initialize winhttp library
Prepare http request
Receive http response
Reference http user-agent string

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58ec0d
mov eax, dword fs:[0]
push eax
sub esp, 0x64
push ebx
push esi
push edi
mov eax, dword [0x5fb1a0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0x10]
xor ebx, ebx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x30], 0
mov dword [eax], 0
mov dword [ebp - 0x2c], 0
mov byte [ebp - 4], 3
call fcn.0042b730
mov ecx, eax
mov byte [ebp - 4], 2
test ecx, ecx
je 0x4054cf
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x34], edi
mov byte [ebp - 4], 6
call fcn.0042b730
mov ecx, eax
mov byte [ebp - 4], 5
test ecx, ecx
je 0x4054d9
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 9
call fcn.0042b730
mov ecx, eax
mov byte [ebp - 4], 8
test ecx, ecx
je 0x4054e3
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x70]
xorps xmm0, xmm0
mov dword [ebp - 0x20], ebx
push ecx
push ebx
mov dword [ebp - 0x6c], ebx
movlpd qword [ebp - 0x64], xmm0
movlpd qword [ebp - 0x58], xmm0
movlpd qword [ebp - 0x50], xmm0
movlpd qword [ebp - 0x48], xmm0
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x70], 0x3c
mov dword [ebp - 0x68], 0xffffffff
mov dword [ebp - 0x5c], 0xffffffff
mov dword [ebp - 0x40], 0xffffffff
mov dword [ebp - 0x38], 0xffffffff
push dword [eax - 0xc]
mov byte [ebp - 4], 0xa
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x4053f1
mov eax, dword [ebp - 0x60]
mov esi, dword [ebp - 0x5c]
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 0xb
call fcn.0042b730
mov ecx, eax
mov byte [ebp - 4], 0xa
test ecx, ecx
je 0x4054ed
cmp dword [ebp - 0x18], ebx
jne 0x4051ba
test esi, esi
jne 0x4054c5
mov eax, dword [ecx]
push 2
push esi
call dword [eax]
test eax, eax
je 0x4054f7
add eax, 0x10
mov dword [ebp - 0x30], eax
test esi, esi
js 0x4054c5
lea ecx, [eax - 0x10]
mov dword [ebp - 0x28], ecx
cmp esi, dword [ecx + 8]
jg 0x4054c5
mov dword [ecx + 4], esi
add esi, esi
xor ecx, ecx
mov word [esi + eax], cx
test esi, esi
je 0x405228
test eax, eax
je 0x405218
mov ecx, dword [ebp - 0x18]
push esi
test ecx, ecx
je 0x40520d
push ecx
push eax
call fcn.005635d0
add esp, 0xc
jmp 0x405228
push 0
push eax
call fcn.00563b50
add esp, 0xc
call fcn.00566e79
mov dword [eax], 0x16
call fcn.00566c6f
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 0xc
push eax
lea ecx, [ebp - 0x1c]
call fcn.004024c0
mov edx, dword [ebp - 0x28]
or esi, 0xffffffff
mov byte [ebp - 4], 0xa
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x405256
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [ebp - 0x44]
lea ecx, [ebp - 0x30]
call fcn.004021d0
push eax
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 0xd
call fcn.004024c0
mov edx, dword [ebp - 0x30]
mov eax, esi
mov byte [ebp - 4], 0xa
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40528c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0
push 0
push 0
push 0
push str.Mozilla_5.0__Windows_NT_10.0_
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x30], eax
test eax, eax
jne 0x4052b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [ebp - 0x1c]
jmp 0x4053f7
mov esi, dword [ebp - 0x1c]
push 0
push dword [ebp - 0x58]
push esi
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov ecx, eax
mov dword [ebp - 0x2c], ecx
test ecx, ecx
je 0x4053f1
xor eax, eax
mov edx, 0x800000
cmp dword [ebp - 0x64], 2
cmove eax, edx
push eax
push 0
push 0
push 0
push dword [ebp - 0x24]
push 0x5a1334
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov ebx, eax
mov dword [ebp - 0x18], ebx
test ebx, ebx
je 0x4053f1
push 0
push 0
push 0
push 0
push 0
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov ecx, eax
mov dword [ebp - 0x28], ecx
test ecx, ecx
je 0x40532a
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp + 0xc]
cmp dword [eax - 4], 1
jle 0x405341
push dword [eax - 0xc]
lea ecx, [ebp + 0xc]
call fcn.00404770
mov eax, dword [ebp + 0xc]
push 0x5a1354
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.005676a8
add esp, 0xc
test eax, eax
jne 0x4053f1
cmp dword [ebp - 0x28], eax
je 0x4053fa
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x4053f1
mov eax, dword [ebp - 0x10]
inc eax
push eax
call fcn.0042a650
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4053e5
mov ecx, dword [ebp - 0x10]
inc ecx
push ecx
push 0
push ebx
call fcn.00563b50
add esp, 0xc
mov dword [ebp - 0x28], 0
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x10]
push ebx
push dword [ebp - 0x18]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x4053ca
push dword [ebp - 0x20]
push 1
push dword [ebp - 0x28]
push ebx
call fcn.005728bd
add esp, 0x10
push ebx
call fcn.0042a659
mov ecx, dword [ebp + 0x10]
add esp, 4
mov eax, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x18]
add dword [ecx], eax
test eax, eax
jmp 0x40535e
mov ebx, dword [ebp - 0x18]
mov dword [ebp - 0x10], 0
jmp 0x4053fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x40540a
push eax
call fcn.005725c8
add esp, 4
mov eax, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test ebx, ebx
je 0x40541b
push ebx
call eax
mov eax, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
je 0x405425
push ecx
call eax
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x405433
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov edx, dword [ebp - 0x24]
or ebx, 0xffffffff
add edx, 0xfffffff0
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x405450
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x405467
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x40547e
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 8]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x405498
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4054b0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00403cc0
push 0x80004005
call fcn.00403cc0
push 0x80004005
call fcn.00403cc0
push 0x80004005
call fcn.00403cc0
push 0x80004005
call fcn.00403cc0
call fcn.0040a040
int3