// File: tylerkaraszewski[P]Argyle/Utils.cpp
// Function: Utils::UriEscape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string Utils::UriEscape(const string& in)
{
  string out;
  for (size_t i = 0; i < in.size(); i++)
  {
    char current = in[i];
    if (
         ((current >= 65) && (current <= 90)) || // A-Z
         ((current >= 97) && (current <= 122)) || // a-z
         ((current >= 48) && (current <= 57)) || // 0-9
         (current == '$') || 
         (current == '&') || 
         (current == '+') || 
         (current == ',') || 
         (current == '/') || 
         (current == ':') || 
         (current == ';') || 
         (current == '=') || 
         (current == '?') || 
         (current == '@') || 
         (current == '-') || 
         (current == '_') || 
         (current == '.') || 
         (current == '+') || 
         (current == '!') || 
         (current == '*') || 
         (current == '(') || 
         (current == ')') ||
         (current == '\'')
       )
    {
      out += current;
    }
    else
    {
      char str[4] = {0};
      snprintf(str, 4, "%%%02hhx", current);
      out += str;
    }
  }
  return out;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movb $0x0, 0x47(%rsp)
callq 0x4570
movq $0x0, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rdi
callq 0x42a0
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x11233
movq 0x48(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x4420
movb (%rax), %al
movb %al, 0x37(%rsp)
movsbl 0x37(%rsp), %eax
cmpl $0x41, %eax
jl 0x110b0
movsbl 0x37(%rsp), %eax
cmpl $0x5a, %eax
jle 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x61, %eax
jl 0x110c8
movsbl 0x37(%rsp), %eax
cmpl $0x7a, %eax
jle 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x30, %eax
jl 0x110e0
movsbl 0x37(%rsp), %eax
cmpl $0x39, %eax
jle 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x24, %eax
je 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x26, %eax
je 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x2b, %eax
je 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x2c, %eax
je 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x2f, %eax
je 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x3a, %eax
je 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x3b, %eax
je 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x3d, %eax
je 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x3f, %eax
je 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x40, %eax
je 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x2d, %eax
je 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x5f, %eax
je 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x2e, %eax
je 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x2b, %eax
je 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x21, %eax
je 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x2a, %eax
je 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x28, %eax
je 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x29, %eax
je 0x111b6
movsbl 0x37(%rsp), %eax
cmpl $0x27, %eax
jne 0x111e3
movq 0x10(%rsp), %rdi
movsbl 0x37(%rsp), %esi
callq 0x4250
jmp 0x111c7
jmp 0x1121e
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
callq 0x4788
jmp 0x11253
movl $0x0, 0x20(%rsp)
movsbl 0x37(%rsp), %ecx
leaq 0x295e(%rip), %rdx      # 0x13b55
xorl %eax, %eax
leaq 0x20(%rsp), %rdi
movq %rdi, (%rsp)
movl $0x4, %esi
callq 0x4620
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
callq 0x4390
jmp 0x1121c
jmp 0x1121e
jmp 0x11220
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x1105e
movb $0x1, 0x47(%rsp)
testb $0x1, 0x47(%rsp)
jne 0x11249
movq 0x10(%rsp), %rdi
callq 0x4788
movq 0x18(%rsp), %rax
addq $0x58, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x46b0
nopl (%rax)