Function at 0x487a40
Capabilities:
Initialize winhttp library
Prepare http request
Set http header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
push 1
push 0x58
call fcn.00596ea3
mov esi, eax
mov dword [ebp - 0x10], 0xffffffff
push fcn.0049b9e0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x18], 0
lea ebx, [ebp + 4]
mov dword [ebp - 0x1c], 0
add ebx, 0xfffffffc
push eax
push ebx
mov dword [ebp - 8], ebx
call fcn.00475ff0
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x20]
push fcn.00477a10
push eax
push ebx
call fcn.00475ff0
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0xc]
push fcn.00477a10
push eax
push ebx
call fcn.00475ff0
push 0x54
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x7c]
push 0
push eax
call fcn.00594c60
add esp, 0x38
cmp dword [0x665250], 0
jne 0x487ad3
push 0
push 0x665254
call fcn.0047e9c0
add esp, 8
lea eax, [esi + 0x40]
mov dword [0x665250], 1
push 0
push eax
call fcn.0047e9c0
push 0x487f30
lea ebx, [esi + 0x34]
push esi
push ebx
call fcn.00484e00
lea eax, [esi + 0x14]
push eax
call fcn.0048c810
add esp, 0x18
test eax, eax
jne 0x487e65
push 1
push 0x50
call fcn.00596ea3
mov ebx, dword [ebp + 0x10]
add esp, 8
mov dword [esi + 0x20], eax
mov dword [eax + 0x48], 0xffffffff
test ebx, ebx
je 0x487b34
push ebx
call fcn.004879b0
add esp, 4
mov dword [esi + 0x1c], ebx
mov eax, dword fs:[0x2c]
lea ebx, [ebp - 0x7c]
test edi, edi
push 0
push dword [ebp + 8]
mov eax, dword [eax]
cmovne ebx, edi
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], ebx
mov dword [eax + 0x10c], edi
mov edi, ebx
mov dword [esi + 0x2c], ebx
push dword [ebp - 0x14]
call fcn.0049cc50
add esp, 0xc
test eax, eax
jne 0x487e62
mov eax, dword [ebp - 0x14]
mov edi, dword [ebp - 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
mov dword [eax], 0
mov eax, dword [ebx + 0x50]
test eax, eax
je 0x487baf
push eax
push str.http:___s
push edi
mov dword [ebp - 0x18], 3
call fcn.00476480
add esp, 4
push eax
call fcn.00477140
push dword [eax]
push dword [ebp - 0xc]
call fcn.00477a40
add esp, 0x14
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x487bc4
push eax
push edi
call fcn.004766b0
add esp, 8
mov ecx, dword [eax]
jmp 0x487bc9
mov ecx, str.wget
mov eax, dword [ebp - 0xc]
push 0x10000000
push 0
push dword [eax]
push dword [ebp - 0x18]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [esi + 0x10], eax
mov edi, ebx
test eax, eax
je 0x487e62
push 0
push 0x6f0c00
push 0x488060
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetStatusCallback]
push eax
call fcn.00590bc0
add esp, 4
cmp eax, 0xffffffff
jne 0x487c24
push str.WinHttpSetStatusCallback_failed__m
push 0x550003
call fcn.00479a10
add esp, 8
jmp 0x487e62
push 4
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0x800
push eax
push 0x54
push dword [esi + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
push eax
call fcn.00590b90
add esp, 4
test eax, eax
jne 0x487c5b
push str.WinHttpSetOption_tls_failed__m
push 0x550003
call fcn.00479a10
add esp, 8
push 0x5d6178
push dword [ebp - 4]
call fcn.0049ba80
mov edi, eax
add esp, 8
mov eax, dword [ebp - 0x24]
mov dword [eax + 0x108], edi
test edi, edi
jne 0x487cc4
push str.PROTOCOL
push dword [ebp - 4]
mov edi, 0x5d6180
call fcn.0049ba40
add esp, 8
nop
mov cl, byte [eax]
cmp cl, byte [edi]
jne 0x487cb0
test cl, cl
je 0x487cac
mov cl, byte [eax + 1]
cmp cl, byte [edi + 1]
jne 0x487cb0
add eax, 2
add edi, 2
test cl, cl
jne 0x487c90
xor eax, eax
jmp 0x487cb5
sbb eax, eax
or eax, 1
test eax, eax
mov edi, 0x50
mov ecx, 0x1bb
cmove edi, ecx
push str.HOSTNAME
push dword [ebp - 4]
call fcn.0049ba40
push eax
push dword [ebp - 8]
call fcn.004766b0
add esp, 0x10
push 0
push edi
push dword [eax]
push dword [esi + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
push eax
call fcn.00590bc0
add esp, 4
mov dword [esi + 0xc], eax
test eax, eax
jne 0x487d12
push str.WinHttpConnect_failed__m
push 0x550003
call fcn.00479a10
add esp, 8
jmp 0x487e60
push str.PROTOCOL
push dword [ebp - 4]
mov edi, 0x5d6180
call fcn.0049ba40
add esp, 8
mov cl, byte [eax]
cmp cl, byte [edi]
jne 0x487d47
test cl, cl
je 0x487d43
mov cl, byte [eax + 1]
cmp cl, byte [edi + 1]
jne 0x487d47
add eax, 2
add edi, 2
test cl, cl
jne 0x487d27
xor edi, edi
jmp 0x487d4c
sbb edi, edi
or edi, 1
push 0x5d61bc
push dword [ebp - 4]
call fcn.0049ba40
push eax
push dword [ebp - 8]
call fcn.004766b0
add esp, 0x10
xor ecx, ecx
test edi, edi
mov edx, 0x800000
cmove ecx, edx
cmp dword [ebx + 4], 0
push ecx
push 0
push 0
push 0
push dword [eax]
mov ecx, 0x5d61cc
mov eax, 0x5d61c0
cmove eax, ecx
push eax
push dword [esi + 0xc]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
push eax
call fcn.00590bc0
add esp, 4
mov dword [esi + 8], eax
test eax, eax
jne 0x487dbc
push str.WinHttpOpenRequest_failed__m
push 0x550003
call fcn.00479a10
add esp, 8
jmp 0x487e60
lea eax, [esi + 0x34]
lock inc dword [eax]
push str.Connection:_close
push dword [ebp - 0x20]
call fcn.00477a40
add esp, 8
push 0xa0000000
push 0xffffffffffffffff
push dword [eax]
push dword [esi + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
mov eax, dword [ebx]
test eax, eax
je 0x487e22
mov edi, ebx
mov ebx, dword [ebp - 8]
mov ecx, dword [eax + 8]
mov eax, dword [eax + 4]
push ecx
push eax
push str._s:__s
push ebx
call fcn.00476620
add esp, 0x10
push 0xa0000000
push 0xffffffffffffffff
push dword [eax]
push dword [esi + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
mov edi, dword [edi]
mov eax, dword [edi]
test eax, eax
jne 0x487def
mov ebx, dword [ebp - 0x28]
mov eax, dword [ebx + 8]
push esi
push eax
push eax
push dword [ebx + 4]
push 0
push 0
push dword [esi + 8]
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
push eax
call fcn.00590b90
add esp, 4
test eax, eax
jne 0x487e59
push str.WinHttpSendRequest_failed__m
push 0x550003
call fcn.00479a10
add esp, 8
jmp 0x487e60
mov dword [ebp - 0x10], 0
mov edi, ebx
lea ebx, [esi + 0x34]
push 0x665254
call fcn.0047e9d0
mov eax, dword [0x66524c]
add esp, 4
test eax, eax
je 0x487e8d
mov eax, dword [eax]
mov dword [esi], eax
mov eax, dword [0x66524c]
mov dword [eax], esi
mov eax, dword [esi]
mov dword [eax + 4], esi
jmp 0x487e95
mov dword [esi], esi
mov dword [0x66524c], esi
push 0x665254
mov dword [esi + 4], 0
call fcn.0047e9e0
add esp, 4
cmp dword [ebp - 0x10], 0
je 0x487eb5
cmp dword [esi + 8], 0
jmp 0x487eca
test edi, edi
je 0x487ed5
cmp dword [edi + 0x20], 0
je 0x487ed5
push esi
call fcn.00488020
add esp, 4
test eax, eax
je 0x487ed5
push esi
call fcn.00487f10
add esp, 4
lea edi, [esi + 0x40]
push edi
call fcn.0047e9d0
push edi
mov dword [esi + 0x30], 1
call fcn.0047e9e0
add esp, 8
or ecx, 0xffffffff
lock xadd dword [ebx], ecx
jne 0x487f02
push dword [ebx + 4]
mov ecx, dword [ebx + 8]
call ecx
add esp, 4
mov eax, dword [ebp - 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret