Function at 0x10004740
Capabilities:
Read http header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101475f8
mov eax, dword fs:[0]
push eax
sub esp, 0xc54
mov eax, dword [0x10189710]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
lea edi, [ebx + 0x480]
push 0x10154fe0
mov edx, edi
mov dword [ebp - 0xc60], ebx
mov byte [ebp - 0xc51], 0
mov dword [ebp - 4], 0
call fcn.100027f0
add esp, 4
cmp dword [0x101a8978], 0
je 0x100047b5
push edi
push 0x10153fb0
push 0
call fcn.1006ed90
add esp, 0xc
push edi
lea eax, [ebx + 0x350]
push 0x10153fb0
push eax
call fcn.1006ed90
mov ecx, dword [ebx + 0x46c]
add esp, 0xc
push 0
lea esi, [ebx + 0x470]
push esi
push 0
push 0
push 0x16
push ecx
mov dword [esi], 0
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x100048f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc58], eax
cmp eax, 0x7a
je 0x100048f9
xor edx, edx
push 0x1fe
push edx
lea eax, [ebp - 0x22e]
push eax
mov word [ebp - 0x230], dx
call fcn.1012e060
add esp, 0xc
xor ecx, ecx
push 0x40e
push ecx
lea edx, [ebp - 0xc4e]
push edx
mov word [ebp - 0xc50], cx
call fcn.1012e060
mov ecx, dword [ebp - 0xc58]
add esp, 0xc
lea ebx, [ebp - 0xc50]
call fcn.10002bf0
mov eax, ebx
push eax
push edi
push str._s:_Error___s__encountered.
lea edx, [ebp - 0x230]
call fcn.100027f0
add esp, 0xc
xor ecx, ecx
lea eax, [ebp - 0x230]
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], cx
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10004890
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x230]
lea esi, [ebp - 0x30]
call fcn.10009fd0
mov esi, dword [ebp - 0xc60]
mov eax, 1
mov byte [ebp - 4], al
push 0xffffffffffffffff
mov dword [esi + 0x22c], eax
push 0
lea ecx, [esi + 0x230]
lea eax, [ebp - 0x30]
call fcn.10009c90
cmp dword [ebp - 0x18], 8
mov edx, dword [ebp - 0xc58]
mov dword [esi + 0x228], edx
jb 0x100048f2
mov eax, dword [ebp - 0x2c]
push eax
call fcn.10128f9e
add esp, 4
xor al, al
jmp 0x10004b0b
mov eax, dword [esi]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.101264a0
add esp, 4
mov dword [ebp - 0xc5c], eax
test eax, eax
je 0x10004b05
push 0
push esi
push eax
mov eax, dword [ebx + 0x46c]
push 0
push 0x16
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x10004a64
mov edx, dword [ebp - 0xc5c]
mov eax, edx
lea esi, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10004950
sub eax, esi
sar eax, 1
push eax
lea esi, [ebx + 0x8a4]
mov eax, edx
call fcn.10009fd0
cmp dword [esi + 0x18], 8
mov byte [ebp - 0xc51], 1
mov dword [ebp - 0xc58], 0
jb 0x10004989
mov esi, dword [esi + 4]
jmp 0x1000498c
add esi, 4
push esi
lea ebx, [ebp - 0xc58]
call fcn.10073be0
mov edi, dword [ebp - 0xc58]
add esp, 4
test edi, edi
je 0x10004af2
push 0x20
push edi
call fcn.10128490
mov esi, eax
add esp, 8
test esi, esi
je 0x10004a1f
xor ecx, ecx
mov byte [ebp - 0x24], 0
mov dword [ebp - 0x23], ecx
mov dword [ebp - 0x1f], ecx
mov dword [ebp - 0x1b], ecx
mov word [ebp - 0x17], cx
mov byte [ebp - 0x15], cl
inc esi
cmp ecx, 4
jge 0x100049ed
mov dl, byte [ecx + esi]
cmp dl, 0x20
je 0x100049ed
mov al, dl
sub al, 0x30
cmp al, 9
ja 0x100049ed
mov byte [ebp + ecx - 0x24], dl
inc ecx
jmp 0x100049d1
lea ecx, [ebp - 0x24]
push ecx
call fcn.10128238
mov edx, dword [ebp - 0xc60]
add esp, 4
cmp dword [0x101a8978], 0
mov dword [edx + 0x18], eax
je 0x10004a56
push eax
lea eax, [ebp - 0x24]
push eax
push str.RC:__s___u_
push 0
call fcn.1006ed90
add esp, 0x10
cmp dword [0x101a8978], 0
je 0x10004a56
push str._Response_Header_Start_
push 0
call fcn.1006ed90
add esp, 8
push edi
push 0x1014d8cc
push 0
call fcn.1006ed90
add esp, 0xc
push str._Response_Header_End_
push 0
call fcn.1006ed90
add esp, 8
push edi
call fcn.10128243
add esp, 4
jmp 0x10004af2
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
push 0x1fe
push ecx
lea edx, [ebp - 0x42e]
push edx
mov esi, eax
mov word [ebp - 0x430], cx
call fcn.1012e060
add esp, 0xc
xor eax, eax
push 0x40e
push eax
lea ecx, [ebp - 0x83e]
push ecx
mov word [ebp - 0x840], ax
call fcn.1012e060
add esp, 0xc
mov ecx, esi
lea ebx, [ebp - 0x840]
call fcn.10002bf0
mov edx, ebx
push edx
push edi
push str._s:_Error___s__encountered.
lea edx, [ebp - 0x430]
call fcn.100027f0
add esp, 0xc
cmp dword [0x101a8978], 0
je 0x10004aeb
lea eax, [ebp - 0x430]
push eax
push 0x10153fb0
push 0
call fcn.1006ed90
add esp, 0xc
mov byte [ebp - 0xc51], 0
mov eax, dword [ebp - 0xc5c]
test eax, eax
je 0x10004b05
push eax
call fcn.10128f5b
add esp, 4
mov al, byte [ebp - 0xc51]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10127db1
mov esp, ebp
pop ebp
ret