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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58a369
mov eax, dword fs:[0]
push eax
sub esp, 0x70
push ebx
push esi
push edi
mov eax, dword [0x5f31c0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 0
mov byte [ebp - 4], 2
call fcn.0042b4c7
mov ecx, eax
mov byte [ebp - 4], 1
test ecx, ecx
je 0x405ea2
nop dword [eax]
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x10], edi
mov byte [ebp - 4], 5
call fcn.0042b4c7
mov byte [ebp - 4], 4
test eax, eax
je 0x405ea2
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 8
call fcn.0042b4c7
mov byte [ebp - 4], 7
test eax, eax
je 0x405ea2
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x7c]
xorps xmm0, xmm0
mov dword [ebp - 0x78], 0
push ecx
push 0
movlpd qword [ebp - 0x70], xmm0
movlpd qword [ebp - 0x64], xmm0
movlpd qword [ebp - 0x5c], xmm0
movlpd qword [ebp - 0x54], xmm0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x7c], 0x3c
mov dword [ebp - 0x74], 0xffffffff
mov dword [ebp - 0x68], 0xffffffff
mov dword [ebp - 0x4c], 0xffffffff
mov dword [ebp - 0x44], 0xffffffff
push dword [eax - 0xc]
mov byte [ebp - 4], 9
push eax
mov dword [ebp - 0x28], 0x2f
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x405e21
mov ebx, dword [ebp - 0x68]
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], eax
mov byte [ebp - 4], 0xa
call fcn.0042b4c7
mov ecx, eax
mov byte [ebp - 4], 9
test ecx, ecx
je 0x405ea2
cmp dword [ebp - 0x30], 0
jne 0x40562e
test ebx, ebx
jne 0x405eac
mov eax, dword [ecx]
push 2
push ebx
call dword [eax]
mov ebx, eax
test ebx, ebx
je 0x405eb6
mov eax, dword [ebp - 0x34]
lea edx, [ebx + 0x10]
mov dword [ebp - 0x2c], edx
test eax, eax
js 0x405eac
cmp eax, dword [ebx + 8]
jg 0x405eac
mov dword [ebx + 4], eax
xor ecx, ecx
add eax, eax
mov word [eax + edx], cx
test eax, eax
je 0x40569e
test edx, edx
je 0x40568b
mov ecx, dword [ebp - 0x30]
push eax
test ecx, ecx
je 0x405680
push ecx
push edx
call fcn.005630b0
add esp, 0xc
jmp 0x40569b
push 0
push edx
call fcn.00563630
add esp, 0xc
call fcn.00566952
mov dword [eax], 0x16
call fcn.005665ff
lea edx, [ebx + 0x10]
lea ecx, [esi - 0x10]
mov byte [ebp - 4], 0xb
mov dword [ebp - 0x34], ecx
cmp ebx, ecx
je 0x4056fc
mov eax, dword [ecx + 0xc]
lea esi, [ecx + 0xc]
shr eax, 0x1f
test al, al
jne 0x4056ed
mov eax, dword [ebx]
cmp eax, dword [ecx]
jne 0x4056ed
push ebx
call fcn.00403fb0
add esp, 4
mov dword [ebp - 0x30], eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x4056e5
mov esi, dword [ebp - 0x34]
push esi
mov ecx, dword [esi]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x30]
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
jmp 0x4056fc
push dword [ebx + 4]
lea ecx, [ebp - 0x1c]
push edx
call fcn.00409f30
mov esi, dword [ebp - 0x1c]
or eax, 0xffffffff
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x405711
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x50]
mov byte [ebp - 4], 0xc
call fcn.0042b4c7
mov byte [ebp - 4], 9
test eax, eax
je 0x405ea2
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x24], eax
push ebx
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 0xd
call fcn.00403ed0
test al, al
jne 0x40576d
test ebx, ebx
jne 0x40574f
xor ecx, ecx
jmp 0x405763
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405754
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x24]
call fcn.00409f30
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
mov byte [ebp - 4], 0xe
mov dword [ebp - 0x30], edx
lea ebx, [eax - 0x10]
cmp ebx, edx
je 0x4057d6
lea ecx, [edx + 0xc]
mov dword [ebp - 0x34], ecx
mov ecx, dword [ecx]
shr ecx, 0x1f
test cl, cl
jne 0x4057ca
mov ecx, dword [ebx]
cmp ecx, dword [edx]
jne 0x4057ca
push ebx
call fcn.00403fb0
mov edx, dword [ebp - 0x34]
add esp, 4
mov dword [ebp - 0x2c], eax
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4057c2
mov eax, dword [ebp - 0x30]
push eax
mov ecx, dword [eax]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x2c]
add eax, 0x10
mov dword [ebp - 0x14], eax
jmp 0x4057d6
push dword [ebx + 4]
lea ecx, [ebp - 0x14]
push eax
call fcn.00409f30
mov byte [ebp - 4], 9
or eax, 0xffffffff
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x4057ef
mov ecx, dword [ebx]
push ebx
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 ebx, eax
mov dword [ebp - 0x30], ebx
test ebx, ebx
je 0x405e21
push 4
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], 0
push eax
push 0x58
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
je 0x405e0e
push 0
push dword [ebp - 0x64]
push esi
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x405e0e
xor ecx, ecx
mov edx, 0x800000
cmp dword [ebp - 0x70], 2
cmove ecx, edx
push ecx
push 0
push 0
push 0
push dword [ebp - 0x14]
push 0x59c334
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov ebx, eax
mov dword [ebp - 0x24], ebx
test ebx, ebx
je 0x405df2
push 0
push 0
push 0
push 0
push 0
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x405d9b
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x405d9b
mov eax, dword [ebp - 0x28]
xor ebx, ebx
mov dword [ebp - 0x34], ebx
nop word [eax + eax]
push 0
lea ecx, [ebp - 0x18]
push ecx
push 0
push 0
push eax
push dword [ebp - 0x24]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x405905
mov eax, dword [ebp - 0x18]
xor ecx, ecx
shr eax, 1
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0042a3e7
add esp, 4
mov dword [ebp - 0x34], eax
lea ecx, [ebp - 0x18]
push 0
push ecx
push eax
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x24]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
cmp dword [ebp - 0x18], 0
jne 0x40591e
inc ebx
mov eax, 0x21
mov dword [ebp - 0x28], eax
cmp ebx, 2
jb 0x4058b0
jmp 0x405d9b
mov byte [ebp - 4], 0xf
call fcn.0042b4c7
mov byte [ebp - 4], 9
test eax, eax
je 0x405ea2
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x20], eax
mov ebx, dword [ebp - 0x34]
lea ecx, [ebp - 0x20]
push ebx
mov byte [ebp - 4], 0x10
call fcn.00403ed0
test al, al
jne 0x40597a
test ebx, ebx
jne 0x40595c
xor ecx, ecx
jmp 0x405970
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405961
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x20]
call fcn.00409f30
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 0x11
push eax
lea ecx, [ebp - 0x10]
call fcn.00402490
mov edx, dword [ebp - 0x20]
or eax, 0xffffffff
mov byte [ebp - 4], 9
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4059a9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push ebx
call fcn.0042a3f0
add esp, 4
cmp dword [ebp - 0x18], 0
je 0x405ded
cmp dword [ebp - 0x28], 0x21
jne 0x405de1
mov edi, dword [ebp - 0x10]
cmp dword [edi - 0xc], 0
lea ebx, [edi - 0x10]
jl 0x405b21
push 0x59c2c8
push edi
call fcn.00562a29
add esp, 8
test eax, eax
je 0x405b21
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x405b21
cmp dword [ebx + 4], 0
jl 0x405b21
push 0x59c190
push edi
call fcn.00562a29
add esp, 8
test eax, eax
je 0x405b21
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x405b21
cmp dword [ebx + 4], 0
jl 0x405b6c
push str..exe_
push edi
call fcn.00562a29
add esp, 8
test eax, eax
je 0x405a93
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x405a93
cmp dword [ebx + 4], 0
jge 0x405a56
or eax, 0xffffffff
jmp 0x405a71
push str..exe_
push edi
call fcn.00562a29
add esp, 8
test eax, eax
jne 0x405a6d
or eax, 0xffffffff
jmp 0x405a71
sub eax, edi
sar eax, 1
add eax, 4
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00406990
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0x12
call fcn.00402490
mov edx, dword [ebp - 0x3c]
jmp 0x405b06
cmp dword [ebx + 4], 0
jl 0x405b6c
push str..msi_
push edi
call fcn.00562a29
add esp, 8
test eax, eax
je 0x405b6c
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x405b6c
cmp dword [ebx + 4], 0
jge 0x405acb
or eax, 0xffffffff
jmp 0x405ae6
push str..msi_
push edi
call fcn.00562a29
add esp, 8
test eax, eax
jne 0x405ae2
or eax, 0xffffffff
jmp 0x405ae6
sub eax, edi
sar eax, 1
add eax, 4
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.00406990
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0x13
call fcn.00402490
mov edx, dword [ebp - 0x40]
add edx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x405b1e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x10]
push edi
call dword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
mov esi, eax
mov byte [ebp - 4], 0x14
call fcn.0042b4c7
mov byte [ebp - 4], 9
test eax, eax
je 0x405ea2
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x20], eax
push esi
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0x15
call fcn.00403ed0
test al, al
jne 0x405bf9
test esi, esi
jne 0x405bd9
xor ecx, ecx
jmp 0x405bef
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp + 8]
call fcn.00402490
push dword [ebp - 0x24]
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call edi
push dword [ebp - 0x2c]
call edi
push dword [ebp - 0x30]
call edi
mov edx, dword [ebp - 0x14]
or edi, 0xffffffff
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x405baa
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov eax, edi
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x405bc1
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x405d4d
mov ecx, dword [ebx]
push ebx
jmp 0x405d48
mov ecx, esi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405be0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x20]
call fcn.00409f30
mov esi, dword [ebp - 0x20]
mov byte [ebp - 4], 0x16
mov ebx, dword [esi - 0xc]
test ebx, ebx
js 0x405eac
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x405c28
push ebx
lea ecx, [ebp - 0x20]
call fcn.00408b40
mov esi, dword [ebp - 0x20]
lea eax, [ebx + 1]
push eax
push esi
call fcn.00566f33
lea eax, [esi - 0x10]
add esp, 8
mov dword [ebp - 0x34], eax
cmp ebx, dword [eax + 8]
jg 0x405eac
mov dword [eax + 4], ebx
xor eax, eax
mov word [esi + ebx*2], ax
mov ecx, str..exe
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x405c7a
test dx, dx
je 0x405c76
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x405c7a
add eax, 4
add ecx, 4
test dx, dx
jne 0x405c54
xor eax, eax
jmp 0x405c7f
sbb eax, eax
or eax, 1
mov byte [ebp - 4], 0x16
test eax, eax
je 0x405d70
mov eax, str..msi
mov cx, word [esi]
cmp cx, word [eax]
jne 0x405cb6
test cx, cx
je 0x405cb2
mov cx, word [esi + 2]
cmp cx, word [eax + 2]
jne 0x405cb6
add esi, 4
add eax, 4
test cx, cx
jne 0x405c90
xor eax, eax
jmp 0x405cbb
sbb eax, eax
or eax, 1
mov byte [ebp - 4], 0x16
test eax, eax
je 0x405d70
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp + 8]
call fcn.00402490
push dword [ebp - 0x24]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x2c]
call esi
push dword [ebp - 0x30]
call esi
mov edx, dword [ebp - 0x34]
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x405d02
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x14]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x405d1c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x1c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x405d36
mov ecx, dword [edx]
push edx
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 0x405d4d
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebp - 0x18], 0
mov byte [ebp - 4], 2
call fcn.0042b4c7
mov ecx, eax
mov byte [ebp - 4], 1
test ecx, ecx
je 0x405ea2
jmp 0x405540
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x10]
push eax
call fcn.00402490
mov edx, dword [ebp - 0x34]
or eax, 0xffffffff
mov byte [ebp - 4], 9
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x405d98
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x1c]
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
cmp dword [eax - 4], 1
jle 0x405db1
push dword [eax - 0xc]
call fcn.00404760
mov ecx, dword [ebp + 0xc]
push 0x100000
push 0
push 0
push dword [ecx]
call dword [sym.imp.SHLWAPI.dll_UrlUnescapeW]
xor ebx, ebx
push dword [ebp - 0x24]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [ebp - 0x2c]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [ebp - 0x30]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x405e29
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x10]
push eax
call fcn.00402490
mov edi, dword [ebp - 0x10]
jmp 0x405d9b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x2c]
mov ebx, eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
push dword [ebp - 0x30]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x405e29
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x30]
mov ebx, eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x405e29
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov edx, dword [ebp - 0x14]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x405e44
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x405e5c
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
or esi, 0xffffffff
add edi, 0xfffffff0
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x405e76
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x405e8e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, ebx
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 0x80004005
call fcn.00403c70
push 0x80070057
call fcn.00403c70
call fcn.0040a050
int3