Function at 0x40e42f
Capabilities:
Initialize winhttp library
Make an http request with a cookie
Prepare http request
Read http header
Receive http response
Send data
Send http request
Set http header

Disassembly:
push 0x2a8
mov eax, 0x499c2b
call fcn.00481e38
mov edi, ecx
mov dword [ebp - 0x294], edi
mov ecx, dword [ebp + 8]
xor ebx, ebx
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x278], ecx
mov dword [ebp - 0x2b4], ecx
mov dword [ebp - 0x27c], eax
mov dword [ebp - 0x288], ebx
call fcn.0040a708
push ebx
push ebx
push ebx
xor esi, esi
mov dword [ebp - 4], ebx
push ebx
inc esi
push str.InstallCapital
mov dword [ebp - 0x288], esi
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x2a0], eax
test eax, eax
je 0x40ed51
mov ecx, edi
call fcn.0040b51d
push eax
lea ecx, [ebp - 0x274]
call fcn.0040edf8
lea ecx, [ebp - 0x28c]
mov dword [ebp - 4], esi
call fcn.00404b1b
push 8
lea eax, [ebp - 0x270]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x274]
mov dword [ebp - 0x26c], 0x50
mov dword [ebp - 0x280], ebx
call fcn.0040eebe
mov edx, str.https:__
mov ecx, eax
call fcn.0040ef0c
lea ecx, [ebp - 0x270]
mov bl, al
call fcn.00404b2f
lea ecx, [ebp - 0x274]
test bl, bl
je 0x40e546
mov eax, 0x800000
mov dword [ebp - 0x26c], 0x1bb
mov dword [ebp - 0x280], eax
lea eax, [ebp - 0x270]
push 8
push eax
call fcn.0040ee93
push 3
pop ebx
push eax
lea ecx, [ebp - 0x274]
mov byte [ebp - 4], bl
call fcn.0040ee3c
lea ecx, [ebp - 0x270]
mov byte [ebp - 4], 2
call fcn.00404b2f
jmp 0x40e5a7
push 7
lea eax, [ebp - 0x270]
push eax
call fcn.0040eebe
mov edx, str.http:__
mov ecx, eax
call fcn.0040ef0c
lea ecx, [ebp - 0x270]
mov bl, al
call fcn.00404b2f
test bl, bl
je 0x40e5a4
push 7
lea eax, [ebp - 0x270]
push eax
lea ecx, [ebp - 0x274]
call fcn.0040ee93
push eax
lea ecx, [ebp - 0x274]
mov byte [ebp - 4], 4
call fcn.0040ee3c
lea ecx, [ebp - 0x270]
mov byte [ebp - 4], 2
call fcn.00404b2f
push 3
pop ebx
push ecx
push 0x2f
lea ecx, [ebp - 0x274]
call fcn.0040ee51
mov esi, eax
cmp esi, 0xffffffff
je 0x40e620
push esi
lea eax, [ebp - 0x270]
push eax
lea ecx, [ebp - 0x274]
call fcn.0040ee93
push eax
lea ecx, [ebp - 0x28c]
mov byte [ebp - 4], 5
call fcn.0040ee3c
lea ecx, [ebp - 0x270]
mov byte [ebp - 4], 2
call fcn.00404b2f
push esi
lea eax, [ebp - 0x270]
push eax
lea ecx, [ebp - 0x274]
call fcn.0040eebe
push eax
lea ecx, [ebp - 0x274]
mov byte [ebp - 4], 6
call fcn.0040ee3c
lea ecx, [ebp - 0x270]
mov byte [ebp - 4], 2
call fcn.00404b2f
lea ecx, [ebp - 0x28c]
call fcn.00404b4c
test al, al
je 0x40e63f
push 0x4a3478
lea ecx, [ebp - 0x28c]
call fcn.00404b34
push ecx
push 0x3a
lea ecx, [ebp - 0x274]
call fcn.0040ee51
mov esi, eax
cmp esi, 0xffffffff
je 0x40e6bb
lea eax, [esi + 1]
push eax
lea eax, [ebp - 0x270]
push eax
lea ecx, [ebp - 0x274]
call fcn.0040ee93
mov ecx, eax
call fcn.00404b49
push eax
call fcn.0047fcaf
pop ecx
lea ecx, [ebp - 0x270]
mov dword [ebp - 0x26c], eax
call fcn.00404b2f
push esi
lea eax, [ebp - 0x270]
push eax
lea ecx, [ebp - 0x274]
call fcn.0040eebe
push eax
lea ecx, [ebp - 0x274]
mov byte [ebp - 4], 7
call fcn.0040ee3c
lea ecx, [ebp - 0x270]
mov byte [ebp - 4], 2
call fcn.00404b2f
lea ecx, [ebp - 0x274]
call fcn.00404b49
push eax
lea ecx, [ebp - 0x268]
call fcn.0040ef80
push 0
push dword [ebp - 0x26c]
mov ecx, eax
call fcn.00404b49
push eax
push dword [ebp - 0x2a0]
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov esi, eax
lea ecx, [ebp - 0x268]
mov dword [ebp - 0x270], esi
call fcn.0040501c
test esi, esi
je 0x40ed27
mov ecx, dword [ebp - 0x27c]
lea eax, [ebp - 0x58]
push eax
call fcn.00412fb1
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 8
call fcn.00404b17
test eax, eax
je 0x40e73f
lea eax, [edi + 0x28]
push eax
lea ecx, [ebp - 0x2ac]
call fcn.0040a6ef
mov esi, eax
mov byte [ebp - 4], 9
jmp 0x40e758
push 0
lea ecx, [ebp - 0x2b0]
call fcn.0040b282
mov esi, eax
push 5
mov dword [ebp - 4], 0xa
pop ebx
lea ecx, [ebp - 0x28c]
mov dword [ebp - 0x288], ebx
call fcn.00404b49
push eax
lea ecx, [ebp - 0x160]
call fcn.0040ef80
mov ecx, dword [ebp - 0x280]
or ecx, 0x100
push ecx
xor ecx, ecx
push ecx
push ecx
push ecx
mov ecx, eax
call fcn.00404b49
push eax
mov ecx, esi
call fcn.00404b49
push eax
push dword [ebp - 0x270]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov esi, eax
lea ecx, [ebp - 0x160]
mov dword [ebp - 0x284], esi
call fcn.0040501c
test bl, 4
je 0x40e7cf
and ebx, 0xfffffffb
lea ecx, [ebp - 0x2b0]
mov dword [ebp - 0x288], ebx
call fcn.00404b2f
mov dword [ebp - 4], 8
test bl, 2
je 0x40e7ef
and ebx, 0xfffffffd
lea ecx, [ebp - 0x2ac]
mov dword [ebp - 0x288], ebx
call fcn.00404b2f
test esi, esi
je 0x40ed0b
push dword [edi + 0x38]
push dword [edi + 0x34]
push dword [edi + 0x30]
push dword [edi + 0x2c]
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
lea ebx, [edi + 0x18]
mov ecx, ebx
mov dword [ebp - 0x290], ebx
call fcn.00404b4c
test al, al
jne 0x40e86c
lea ecx, [ebp - 0x26c]
call fcn.00404b1b
mov byte [ebp - 4], 0xb
lea eax, [ebp - 0x26c]
push dword [ebx]
push str.Cookie:__s
push eax
call fcn.0040a607
add esp, 0xc
lea ecx, [ebp - 0x26c]
push 0xa0000000
push 0xffffffffffffffff
call fcn.00404b49
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
lea ecx, [ebp - 0x26c]
mov byte [ebp - 4], 8
call fcn.00404b2f
lea ecx, [edi + 0x1c]
call fcn.00404b4c
test al, al
jne 0x40e88f
push 0xa0000000
push 0xffffffffffffffff
lea ecx, [edi + 0x1c]
call fcn.00404b49
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
lea ecx, [ebp - 0x29c]
call fcn.00413034
lea ecx, [ebp - 0x28]
call fcn.0040a708
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 0xd
call fcn.00404b17
mov ecx, dword [ebp - 0x27c]
mov dword [ebp - 0x26c], eax
lea eax, [ebp - 0x40]
push eax
call fcn.00412fb1
push eax
lea ecx, [ebp - 0x28]
call fcn.0040ed74
mov ecx, eax
call fcn.00405d95
mov bl, al
lea ecx, [ebp - 0x40]
neg bl
sbb bl, bl
call fcn.0040b62f
inc bl
je 0x40e949
mov edi, dword [ebp - 0x26c]
mov esi, dword [ebp - 0x27c]
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x29c]
call fcn.004132b0
lea ecx, [ebp - 0x28]
call fcn.00404b17
add edi, eax
mov ecx, esi
lea eax, [ebp - 0x40]
push eax
call fcn.00412fb1
push eax
lea ecx, [ebp - 0x28]
call fcn.0040ed74
mov ecx, eax
call fcn.00405d95
mov bl, al
lea ecx, [ebp - 0x40]
neg bl
sbb bl, bl
call fcn.0040b62f
inc bl
jne 0x40e8f1
mov esi, dword [ebp - 0x284]
mov dword [ebp - 0x26c], edi
mov edi, dword [ebp - 0x294]
xor ebx, ebx
lea ecx, [ebp - 0x58]
push ebx
push dword [ebp - 0x26c]
call fcn.00404b17
push eax
lea ecx, [ebp - 0x58]
call fcn.0040b51d
push eax
push ebx
push ebx
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x40ece0
mov dword [ebp - 0x280], ebx
lea ecx, [ebp - 0x29c]
call fcn.0040ef27
test al, al
jne 0x40ea53
lea ecx, [ebp - 0x29c]
call fcn.0040ef30
and dword [ebp - 0x26c], 0
mov ebx, eax
mov ecx, ebx
mov dword [ebp - 0x27c], ebx
xor edi, edi
call fcn.00404b17
test eax, eax
je 0x40ea28
mov ecx, ebx
call fcn.00404b17
sub eax, edi
mov ecx, 0x2800
cmp eax, ecx
jbe 0x40e9cb
mov ebx, ecx
jmp 0x40e9d6
mov ecx, ebx
call fcn.00404b17
mov ebx, eax
sub ebx, edi
mov ecx, dword [ebp - 0x27c]
lea eax, [ebp - 0x26c]
push eax
push ebx
call fcn.0040b51d
add eax, edi
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpWriteData]
test eax, eax
je 0x40ea28
cmp dword [ebp - 0x26c], ebx
jne 0x40ea28
mov eax, dword [ebp - 0x280]
add eax, dword [ebp - 0x26c]
mov ebx, dword [ebp - 0x27c]
mov ecx, ebx
add edi, dword [ebp - 0x26c]
mov dword [ebp - 0x280], eax
call fcn.00404b17
cmp edi, eax
jb 0x40e9b5
lea eax, [ebp - 0x2a8]
push eax
lea ecx, [ebp - 0x29c]
call fcn.004132d3
lea ecx, [ebp - 0x29c]
push dword [eax]
lea eax, [ebp - 0x284]
push eax
call fcn.0040ef48
jmp 0x40e97b
xor ebx, ebx
push ebx
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov edi, dword [ebp - 0x294]
test eax, eax
je 0x40ece0
push ebx
lea eax, [ebp - 0x2a8]
mov dword [ebp - 0x2a8], 4
push eax
lea eax, [edi + 0x24]
push eax
push ebx
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
push 0x20000013
push esi
call ebx
and dword [ebp - 0x2a4], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f76
je 0x40eb9d
mov edi, dword [ebp - 0x290]
lea eax, [ebp - 0x2a4]
xor ecx, ecx
push eax
lea eax, [ebp - 0x27c]
mov dword [ebp - 0x27c], ecx
push eax
push ecx
push ecx
push 0x2b
push esi
call ebx
test eax, eax
jne 0x40eb86
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40eb86
lea ecx, [ebp - 0x26c]
call fcn.00404b1b
mov byte [ebp - 4], 0xe
lea ecx, [ebp - 0x26c]
mov eax, dword [ebp - 0x27c]
shr eax, 1
push eax
call fcn.0040b126
lea ecx, [ebp - 0x2a4]
mov dword [ebp - 0x290], eax
push ecx
lea ecx, [ebp - 0x27c]
push ecx
push eax
push 0
push 0x2b
push esi
call ebx
test eax, eax
jne 0x40eb3b
mov eax, dword [ebp - 0x290]
xor ecx, ecx
push 0x2f76
mov word [eax], cx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ecx
lea ecx, [ebp - 0x26c]
call fcn.0040a205
lea ecx, [ebp - 0x26c]
call fcn.00404b4c
test al, al
jne 0x40eb77
mov ecx, edi
call fcn.00404b4c
test al, al
jne 0x40eb69
push ecx
mov ecx, edi
call fcn.0040ef18
lea eax, [ebp - 0x26c]
mov ecx, edi
push eax
call fcn.00412f6a
lea ecx, [ebp - 0x26c]
mov byte [ebp - 4], 0xd
call fcn.00404b2f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f76
jne 0x40eaae
mov edi, dword [ebp - 0x294]
lea eax, [ebp - 0x284]
xor ecx, ecx
push eax
lea eax, [ebp - 0x280]
mov dword [ebp - 0x280], ecx
push eax
push ecx
push ecx
push 0x16
push esi
mov dword [ebp - 0x284], ecx
call ebx
test eax, eax
jne 0x40ec4b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40ec4b
lea ecx, [ebp - 0x26c]
call fcn.00404b1b
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x26c]
mov eax, dword [ebp - 0x280]
shr eax, 1
push eax
call fcn.0040b126
lea ecx, [ebp - 0x284]
mov dword [ebp - 0x290], eax
push ecx
lea ecx, [ebp - 0x280]
push ecx
push eax
push 0
push 0x16
push esi
call ebx
test eax, eax
jne 0x40ec21
mov eax, dword [ebp - 0x290]
xor ecx, ecx
mov word [eax], cx
push ecx
lea ecx, [ebp - 0x26c]
call fcn.0040a205
lea eax, [ebp - 0x26c]
push eax
lea ecx, [edi + 0x20]
call fcn.00404b57
lea ecx, [ebp - 0x26c]
mov byte [ebp - 4], 0xd
call fcn.00404b2f
mov ebx, dword [ebp - 0x278]
and dword [ebp - 0x278], 0
lea eax, [ebp - 0x278]
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
mov eax, dword [ebp - 0x278]
je 0x40ecd0
test eax, eax
je 0x40ecd8
inc eax
push eax
call fcn.0047ac3c
pop ecx
push 0
push dword [ebp - 0x278]
mov edi, eax
push edi
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x40ecc3
mov eax, dword [ebp - 0x278]
lea ecx, [ebp - 0x40]
mov byte [edi + eax], 0
push dword [ebp - 0x278]
push edi
call fcn.0040a731
push eax
mov ecx, ebx
mov byte [ebp - 4], 0x10
call fcn.0040edef
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 0xd
call fcn.0040b62f
push edi
call fcn.0047de81
mov eax, dword [ebp - 0x278]
pop ecx
test eax, eax
jne 0x40ec51
mov edi, dword [ebp - 0x294]
jmp 0x40ece6
mov ebx, dword [ebp - 0x278]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov dword [edi + 0x3c], eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea ecx, [ebp - 0x28]
call fcn.0040b62f
lea ecx, [ebp - 0x29c]
call fcn.004130d9
jmp 0x40ed11
mov ebx, dword [ebp - 0x278]
push dword [ebp - 0x270]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea ecx, [ebp - 0x58]
call fcn.0040b62f
jmp 0x40ed2d
mov ebx, dword [ebp - 0x278]
push dword [ebp - 0x2a0]
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
lea ecx, [ebp - 0x28c]
call fcn.00404b2f
lea ecx, [ebp - 0x274]
call fcn.00404b2f
jmp 0x40ed57
mov ebx, dword [ebp - 0x278]
mov eax, ebx
call fcn.00481de7
ret 0xc