Function at 0x406ec0
Capabilities:
Set http header

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x412b39
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push ebp
mov ebp, ecx
xor ebx, ebx
cmp dword [ebp + 0x90], ebx
je 0x406ffd
mov al, byte [esp + 0x28]
push esi
push edi
push str.Cookie:
mov byte [esp + 0x14], al
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
lea ecx, [esp + 0x10]
push eax
push str.Cookie:
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int______thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::assign_unsigned_short_int_const___unsigned_int_]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::npos]
mov dword [esp + 0x28], ebx
mov eax, dword [ecx]
mov ecx, dword [ebp + 0x90]
mov esi, eax
cmp ecx, esi
jae 0x406f38
mov esi, ecx
sub eax, dword [esp + 0x18]
cmp eax, esi
ja 0x406f46
call dword [sym.imp.MSVCP60.dll_void___cdecl_std::_Xlen_void_]
cmp esi, ebx
jbe 0x406f91
mov edx, dword [esp + 0x18]
push ebx
lea ecx, [esp + 0x14]
lea edi, [edx + esi]
push edi
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Grow_unsigned_int__bool_]
test al, al
je 0x406f91
mov eax, dword [ebp + 0x8c]
cmp eax, ebx
jne 0x406f70
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
mov ecx, dword [esp + 0x14]
push esi
push eax
mov eax, dword [esp + 0x20]
lea edx, [ecx + eax*2]
push edx
call fcn.00407840
add esp, 0xc
lea ecx, [esp + 0x10]
push edi
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Eos_unsigned_int_]
mov eax, dword [esp + 0x14]
pop edi
cmp eax, ebx
pop esi
jne 0x406fa0
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_short_int_const__private:_static_unsigned_short_int_const____cdecl_std::basic_string_unsigned_short_int__struct_std::char_traits_unsigned_short_int___class_std::allocator_unsigned_short_int__::_Nullstr_void_::_2::_C]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x28]
push 0x1000000
push ecx
push eax
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpAddRequestHeaders]
test eax, eax
jne 0x406fc6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 0xc4], eax
mov ecx, dword [esp + 0xc]
cmp ecx, ebx
je 0x406ffd
mov al, byte [ecx - 1]
cmp al, bl
je 0x406ff1
cmp al, 0xff
je 0x406ff1
dec al
pop ebp
mov byte [ecx - 1], al
pop ebx
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x1c
ret 4
add ecx, 0xfffffffe
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x18]
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret 4