Function at 0x525520
Capabilities:
Read http header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59bfdd
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x61094c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
lea ecx, [ebp - 0x14]
mov esi, dword [ebp + 8]
push 0
push ecx
push 0
push 0
push dword [ebp + 0x10]
mov dword [ebp - 0x30], esi
push eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x14], 0
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x5256b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f76
jne 0x5255be
xor eax, eax
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00553cca
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x5256d2
mov ebx, dword [ebp - 0x14]
xor eax, eax
shr ebx, 1
dec ebx
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
cmp ebx, 7
ja 0x525614
mov dword [ebp - 0x1c], ebx
test ebx, ebx
je 0x525608
mov ecx, ebx
lea edi, [ebp - 0x2c]
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
xor eax, eax
mov word [ebp + ebx*2 - 0x2c], ax
mov edx, dword [ebp - 0x2c]
jmp 0x525675
cmp ebx, 0x7ffffffe
ja 0x525706
mov edi, ebx
or edi, 7
cmp edi, 0x7ffffffe
jbe 0x525634
mov edi, SysReAllocString
jmp 0x52563e
mov eax, 0xa
cmp edi, eax
cmovb edi, eax
xor ecx, ecx
mov eax, edi
add eax, 1
setb cl
neg ecx
or ecx, eax
push ecx
lea ecx, [ebp - 0x2c]
call fcn.00425a60
mov edx, eax
mov dword [ebp - 0x18], edi
xor eax, eax
mov dword [ebp - 0x1c], ebx
mov ecx, ebx
mov edi, edx
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
xor eax, eax
mov word [edx + ebx*2], ax
mov dword [ebp - 0x2c], edx
cmp dword [ebp - 0x18], 8
lea ecx, [ebp - 0x14]
push 0
push ecx
lea eax, [ebp - 0x2c]
mov dword [ebp - 4], 0
cmovae eax, edx
push eax
push 0
push dword [ebp + 0x10]
push dword [ebp - 0x30]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x52570b
lea eax, [ebp - 0x2c]
mov ecx, esi
push eax
call fcn.0042d7b0
lea ecx, [ebp - 0x2c]
call fcn.00424580
jmp 0x5255a0
push str.WinHttp:_WinHttpQueryHeader_unexpectedly_returned_true
lea ecx, [ebp - 0x34]
call fcn.0042da80
push 0x608b3c
lea eax, [ebp - 0x34]
push eax
call fcn.00555b8c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00521e40
add esp, 4
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.WinHttp:_Failed_to_query_header_length
push esi
push eax
lea ecx, [ebp - 0x3c]
call fcn.0051fd40
push 0x608ae8
lea eax, [ebp - 0x3c]
push eax
call fcn.00555b8c
call fcn.004213b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00521e40
add esp, 4
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.WinHttp:_Failed_to_query_header_value
push esi
push eax
lea ecx, [ebp - 0x4c]
call fcn.0051fd40
push 0x608ae8
lea eax, [ebp - 0x4c]
push eax
call fcn.00555b8c
int3