Function at 0x4310e0
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.0053fce5
mov esi, eax
mov dword [ebp - 0x10], 0xffffffff
push fcn.00430a90
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.0041f380
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x20]
push fcn.00420da0
push eax
push ebx
call fcn.0041f380
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0xc]
push fcn.00420da0
push eax
push ebx
call fcn.0041f380
push 0x54
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x7c]
push 0
push eax
call fcn.0053daa0
add esp, 0x38
cmp dword [0x5fad58], 0
jne 0x431173
push 0
push 0x5fad5c
call fcn.00427d60
add esp, 8
lea eax, [esi + 0x40]
mov dword [0x5fad58], 1
push 0
push eax
call fcn.00427d60
push 0x4315d0
lea ebx, [esi + 0x34]
push esi
push ebx
call fcn.0042dd30
lea eax, [esi + 0x14]
push eax
call fcn.00435eb0
add esp, 0x18
test eax, eax
jne 0x431505
push 1
push 0x50
call fcn.0053fce5
mov ebx, dword [ebp + 0x10]
add esp, 8
mov dword [esi + 0x20], eax
mov dword [eax + 0x48], 0xffffffff
test ebx, ebx
je 0x4311d4
push ebx
call fcn.00431050
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.00445c30
add esp, 0xc
test eax, eax
jne 0x431502
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 0x43124f
push eax
push str.http:___s
push edi
mov dword [ebp - 0x18], 3
call fcn.0041f810
add esp, 4
push eax
call fcn.004204d0
push dword [eax]
push dword [ebp - 0xc]
call fcn.00420dd0
add esp, 0x14
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x431264
push eax
push edi
call fcn.0041fa40
add esp, 8
mov ecx, dword [eax]
jmp 0x431269
mov ecx, 0x56ce2c
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 0x431502
push 0
push 0x6f0c00
push 0x431700
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetStatusCallback]
push eax
call fcn.00539bc0
add esp, 4
cmp eax, 0xffffffff
jne 0x4312c4
push str.WinHttpSetStatusCallback_failed__m
push 0x550003
call fcn.00422d60
add esp, 8
jmp 0x431502
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.00539b90
add esp, 4
test eax, eax
jne 0x4312fb
push str.WinHttpSetOption_tls_failed__m
push 0x550003
call fcn.00422d60
add esp, 8
push str.PORT
push dword [ebp - 4]
call fcn.00430b30
mov edi, eax
add esp, 8
mov eax, dword [ebp - 0x24]
mov dword [eax + 0x108], edi
test edi, edi
jne 0x431364
push str.PROTOCOL
push dword [ebp - 4]
mov edi, 0x56ce84
call fcn.00430af0
add esp, 8
nop
mov cl, byte [eax]
cmp cl, byte [edi]
jne 0x431350
test cl, cl
je 0x43134c
mov cl, byte [eax + 1]
cmp cl, byte [edi + 1]
jne 0x431350
add eax, 2
add edi, 2
test cl, cl
jne 0x431330
xor eax, eax
jmp 0x431355
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.00430af0
push eax
push dword [ebp - 8]
call fcn.0041fa40
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.00539bc0
add esp, 4
mov dword [esi + 0xc], eax
test eax, eax
jne 0x4313b2
push str.WinHttpConnect_failed__m
push 0x550003
call fcn.00422d60
add esp, 8
jmp 0x431500
push str.PROTOCOL
push dword [ebp - 4]
mov edi, 0x56ce84
call fcn.00430af0
add esp, 8
mov cl, byte [eax]
cmp cl, byte [edi]
jne 0x4313e7
test cl, cl
je 0x4313e3
mov cl, byte [eax + 1]
cmp cl, byte [edi + 1]
jne 0x4313e7
add eax, 2
add edi, 2
test cl, cl
jne 0x4313c7
xor edi, edi
jmp 0x4313ec
sbb edi, edi
or edi, 1
push 0x56cec0
push dword [ebp - 4]
call fcn.00430af0
push eax
push dword [ebp - 8]
call fcn.0041fa40
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, 0x56ced0
mov eax, 0x56cec4
cmove eax, ecx
push eax
push dword [esi + 0xc]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
push eax
call fcn.00539bc0
add esp, 4
mov dword [esi + 8], eax
test eax, eax
jne 0x43145c
push str.WinHttpOpenRequest_failed__m
push 0x550003
call fcn.00422d60
add esp, 8
jmp 0x431500
lea eax, [esi + 0x34]
lock inc dword [eax]
push str.Connection:_close
push dword [ebp - 0x20]
call fcn.00420dd0
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 0x4314c2
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.0041f9b0
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 0x43148f
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.00539b90
add esp, 4
test eax, eax
jne 0x4314f9
push str.WinHttpSendRequest_failed__m
push 0x550003
call fcn.00422d60
add esp, 8
jmp 0x431500
mov dword [ebp - 0x10], 0
mov edi, ebx
lea ebx, [esi + 0x34]
push 0x5fad5c
call fcn.00427d70
mov eax, dword [0x5fad54]
add esp, 4
test eax, eax
je 0x43152d
mov eax, dword [eax]
mov dword [esi], eax
mov eax, dword [0x5fad54]
mov dword [eax], esi
mov eax, dword [esi]
mov dword [eax + 4], esi
jmp 0x431535
mov dword [esi], esi
mov dword [0x5fad54], esi
push 0x5fad5c
mov dword [esi + 4], 0
call fcn.00427d80
add esp, 4
cmp dword [ebp - 0x10], 0
je 0x431555
cmp dword [esi + 8], 0
jmp 0x43156a
test edi, edi
je 0x431575
cmp dword [edi + 0x20], 0
je 0x431575
push esi
call fcn.004316c0
add esp, 4
test eax, eax
je 0x431575
push esi
call fcn.004315b0
add esp, 4
lea edi, [esi + 0x40]
push edi
call fcn.00427d70
push edi
mov dword [esi + 0x30], 1
call fcn.00427d80
add esp, 8
or ecx, 0xffffffff
lock xadd dword [ebx], ecx
jne 0x4315a2
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