Function at 0x404f10
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 0x584b99
mov eax, dword fs:[0]
push eax
sub esp, 0x70
push ebx
push esi
push edi
mov eax, dword [0x5eb1c0]
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.0042613a
mov ecx, eax
mov byte [ebp - 4], 1
test ecx, ecx
je 0x4058c2
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.0042613a
mov byte [ebp - 4], 4
test eax, eax
je 0x4058c2
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.0042613a
mov byte [ebp - 4], 7
test eax, eax
je 0x4058c2
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 0x405841
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.0042613a
mov ecx, eax
mov byte [ebp - 4], 9
test ecx, ecx
je 0x4058c2
cmp dword [ebp - 0x30], 0
jne 0x40504e
test ebx, ebx
jne 0x4058cc
mov eax, dword [ecx]
push 2
push ebx
call dword [eax]
mov ebx, eax
test ebx, ebx
je 0x4058d6
mov eax, dword [ebp - 0x34]
lea edx, [ebx + 0x10]
mov dword [ebp - 0x2c], edx
test eax, eax
js 0x4058cc
cmp eax, dword [ebx + 8]
jg 0x4058cc
mov dword [ebx + 4], eax
xor ecx, ecx
add eax, eax
mov word [eax + edx], cx
test eax, eax
je 0x4050be
test edx, edx
je 0x4050ab
mov ecx, dword [ebp - 0x30]
push eax
test ecx, ecx
je 0x4050a0
push ecx
push edx
call fcn.0055ddc0
add esp, 0xc
jmp 0x4050bb
push 0
push edx
call fcn.0055e340
add esp, 0xc
call fcn.00561652
mov dword [eax], 0x16
call fcn.005612ff
lea edx, [ebx + 0x10]
lea ecx, [esi - 0x10]
mov byte [ebp - 4], 0xb
mov dword [ebp - 0x34], ecx
cmp ebx, ecx
je 0x40511c
mov eax, dword [ecx + 0xc]
lea esi, [ecx + 0xc]
shr eax, 0x1f
test al, al
jne 0x40510d
mov eax, dword [ebx]
cmp eax, dword [ecx]
jne 0x40510d
push ebx
call fcn.004039d0
add esp, 4
mov dword [ebp - 0x30], eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x405105
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 0x40511c
push dword [ebx + 4]
lea ecx, [ebp - 0x1c]
push edx
call fcn.00409540
mov esi, dword [ebp - 0x1c]
or eax, 0xffffffff
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x405131
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.0042613a
mov byte [ebp - 4], 9
test eax, eax
je 0x4058c2
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.004038f0
test al, al
jne 0x40518d
test ebx, ebx
jne 0x40516f
xor ecx, ecx
jmp 0x405183
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405174
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x24]
call fcn.00409540
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 0x4051f6
lea ecx, [edx + 0xc]
mov dword [ebp - 0x34], ecx
mov ecx, dword [ecx]
shr ecx, 0x1f
test cl, cl
jne 0x4051ea
mov ecx, dword [ebx]
cmp ecx, dword [edx]
jne 0x4051ea
push ebx
call fcn.004039d0
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 0x4051e2
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 0x4051f6
push dword [ebx + 4]
lea ecx, [ebp - 0x14]
push eax
call fcn.00409540
mov byte [ebp - 4], 9
or eax, 0xffffffff
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x40520f
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 0x405841
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 0x40582e
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 0x40582e
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 0x596124
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov ebx, eax
mov dword [ebp - 0x24], ebx
test ebx, ebx
je 0x405812
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 0x4057bb
push 0
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x4057bb
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 0x405325
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.0042505a
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 0x40533e
inc ebx
mov eax, 0x21
mov dword [ebp - 0x28], eax
cmp ebx, 2
jb 0x4052d0
jmp 0x4057bb
mov byte [ebp - 4], 0xf
call fcn.0042613a
mov byte [ebp - 4], 9
test eax, eax
je 0x4058c2
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.004038f0
test al, al
jne 0x40539a
test ebx, ebx
jne 0x40537c
xor ecx, ecx
jmp 0x405390
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405381
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x20]
call fcn.00409540
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 0x4053c9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push ebx
call fcn.00425063
add esp, 4
cmp dword [ebp - 0x18], 0
je 0x40580d
cmp dword [ebp - 0x28], 0x21
jne 0x405801
mov edi, dword [ebp - 0x10]
cmp dword [edi - 0xc], 0
lea ebx, [edi - 0x10]
jl 0x405541
push 0x5960b8
push edi
call fcn.0055d739
add esp, 8
test eax, eax
je 0x405541
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x405541
cmp dword [ebx + 4], 0
jl 0x405541
push 0x595f80
push edi
call fcn.0055d739
add esp, 8
test eax, eax
je 0x405541
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x405541
cmp dword [ebx + 4], 0
jl 0x40558c
push str..exe_
push edi
call fcn.0055d739
add esp, 8
test eax, eax
je 0x4054b3
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x4054b3
cmp dword [ebx + 4], 0
jge 0x405476
or eax, 0xffffffff
jmp 0x405491
push str..exe_
push edi
call fcn.0055d739
add esp, 8
test eax, eax
jne 0x40548d
or eax, 0xffffffff
jmp 0x405491
sub eax, edi
sar eax, 1
add eax, 4
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00405fa0
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0x12
call fcn.00402490
mov edx, dword [ebp - 0x3c]
jmp 0x405526
cmp dword [ebx + 4], 0
jl 0x40558c
push str..msi_
push edi
call fcn.0055d739
add esp, 8
test eax, eax
je 0x40558c
sub eax, edi
sar eax, 1
cmp eax, 0xffffffff
je 0x40558c
cmp dword [ebx + 4], 0
jge 0x4054eb
or eax, 0xffffffff
jmp 0x405506
push str..msi_
push edi
call fcn.0055d739
add esp, 8
test eax, eax
jne 0x405502
or eax, 0xffffffff
jmp 0x405506
sub eax, edi
sar eax, 1
add eax, 4
lea ecx, [ebp - 0x10]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.00405fa0
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 0x40553e
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.0042613a
mov byte [ebp - 4], 9
test eax, eax
je 0x4058c2
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.004038f0
test al, al
jne 0x405619
test esi, esi
jne 0x4055f9
xor ecx, ecx
jmp 0x40560f
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 0x4055ca
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 0x4055e1
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 0x40576d
mov ecx, dword [ebx]
push ebx
jmp 0x405768
mov ecx, esi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405600
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x20]
call fcn.00409540
mov esi, dword [ebp - 0x20]
mov byte [ebp - 4], 0x16
mov ebx, dword [esi - 0xc]
test ebx, ebx
js 0x4058cc
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x405648
push ebx
lea ecx, [ebp - 0x20]
call fcn.00408150
mov esi, dword [ebp - 0x20]
lea eax, [ebx + 1]
push eax
push esi
call fcn.00561c33
lea eax, [esi - 0x10]
add esp, 8
mov dword [ebp - 0x34], eax
cmp ebx, dword [eax + 8]
jg 0x4058cc
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 0x40569a
test dx, dx
je 0x405696
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40569a
add eax, 4
add ecx, 4
test dx, dx
jne 0x405674
xor eax, eax
jmp 0x40569f
sbb eax, eax
or eax, 1
mov byte [ebp - 4], 0x16
test eax, eax
je 0x405790
mov eax, str..msi
mov cx, word [esi]
cmp cx, word [eax]
jne 0x4056d6
test cx, cx
je 0x4056d2
mov cx, word [esi + 2]
cmp cx, word [eax + 2]
jne 0x4056d6
add esi, 4
add eax, 4
test cx, cx
jne 0x4056b0
xor eax, eax
jmp 0x4056db
sbb eax, eax
or eax, 1
mov byte [ebp - 4], 0x16
test eax, eax
je 0x405790
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 0x405722
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 0x40573c
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 0x405756
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 0x40576d
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.0042613a
mov ecx, eax
mov byte [ebp - 4], 1
test ecx, ecx
je 0x4058c2
jmp 0x404f60
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 0x4057b8
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 0x4057d1
push dword [eax - 0xc]
call fcn.00404180
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 0x405849
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x10]
push eax
call fcn.00402490
mov edi, dword [ebp - 0x10]
jmp 0x4057bb
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 0x405849
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x30]
mov ebx, eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x405849
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 0x405864
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 0x40587c
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 0x405896
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 0x4058ae
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.00403690
push 0x80070057
call fcn.00403690
call fcn.00409660
int3