Function at 0x525580
Capabilities:
Read http header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59c42d
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 0x525717
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2f76
jne 0x52561e
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.00553d2a
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x525732
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 0x525674
mov dword [ebp - 0x1c], ebx
test ebx, ebx
je 0x525668
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 0x5256d5
cmp ebx, 0x7ffffffe
ja 0x525766
mov edi, ebx
or edi, 7
cmp edi, 0x7ffffffe
jbe 0x525694
mov edi, SysReAllocString
jmp 0x52569e
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 0x52576b
lea eax, [ebp - 0x2c]
mov ecx, esi
push eax
call fcn.0042d7d0
lea ecx, [ebp - 0x2c]
call fcn.00424580
jmp 0x525600
push str.WinHttp:_WinHttpQueryHeader_unexpectedly_returned_true
lea ecx, [ebp - 0x34]
call fcn.0042daa0
push 0x608f44
lea eax, [ebp - 0x34]
push eax
call fcn.00555bec
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00521ea0
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.0051fda0
push 0x608ef0
lea eax, [ebp - 0x3c]
push eax
call fcn.00555bec
call fcn.004213b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00521ea0
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.0051fda0
push 0x608ef0
lea eax, [ebp - 0x4c]
push eax
call fcn.00555bec
int3