// File: coolsuperman[P]ShareCataLogServer/upload.cc
// Function: Upload::GetFileName(char*, int*)
bool GetFileName(char *buf,int * content_pos){
      char* ptr=NULL;
      ptr = strstr(buf,"\r\n\r\n");
      if(ptr==NULL){//获取失败
        *content_pos=0;//前面数据不能删；
        return false;
      }
      *content_pos = ptr-buf+4;
      std::string header;
      header.assign(buf,ptr-buf);
      std::string file_sep = "filename=\"";
      size_t pos = header.find(file_sep);
      if(pos==std::string::npos)
        return false;
      _file_name  = header.substr(pos+file_sep.size());
      pos = _file_name.find("\"");
      if(pos==std::string::npos)
        return false;
      _file_name.erase(pos);
      fprintf(stderr,"upload file:[%s]\n",_file_name.c_str());
      return true;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x269c(%rip), %rsi      # 0x72a1
callq 0x2060
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x4c28
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movb $0x0, -0x1(%rbp)
jmp 0x4e2a
movl -0x28(%rbp), %ecx
movl -0x18(%rbp), %eax
subl %eax, %ecx
addl $0x4, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
leaq -0x48(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x22f0
movq -0xc0(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
subq %rsi, %rdx
callq 0x22c0
jmp 0x4c62
leaq -0x79(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x23d0
movq -0xc8(%rbp), %rdx
leaq 0x2626(%rip), %rsi      # 0x72a6
leaq -0x78(%rbp), %rdi
callq 0x22e0
jmp 0x4c8b
leaq -0x79(%rbp), %rdi
callq 0x2260
leaq -0x48(%rbp), %rdi
leaq -0x78(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x2440
movq %rax, -0x88(%rbp)
cmpq $-0x1, -0x88(%rbp)
jne 0x4cf4
movb $0x0, -0x1(%rbp)
movl $0x1, -0x8c(%rbp)
jmp 0x4e0b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x4e1f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x79(%rbp), %rdi
callq 0x2260
jmp 0x4e1f
movq -0x88(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x2170
movq -0xd0(%rbp), %rdx
addq %rax, %rdx
leaq -0xb0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
movq $-0x1, %rcx
callq 0x2240
jmp 0x4d2e
movq -0xb8(%rbp), %rdi
addq $0x10, %rdi
leaq -0xb0(%rbp), %rsi
callq 0x2290
leaq -0xb0(%rbp), %rdi
callq 0x2458
movq -0xb8(%rbp), %rdi
addq $0x10, %rdi
leaq 0x254c(%rip), %rsi      # 0x72af
xorl %eax, %eax
movl %eax, %edx
callq 0x2430
movq %rax, -0x88(%rbp)
cmpq $-0x1, -0x88(%rbp)
jne 0x4da4
movb $0x0, -0x1(%rbp)
movl $0x1, -0x8c(%rbp)
jmp 0x4e0b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x2458
jmp 0x4e1f
movq -0xb8(%rbp), %rdi
addq $0x10, %rdi
movq -0x88(%rbp), %rsi
movq $-0x1, %rdx
callq 0x2070
jmp 0x4dc4
movq -0xb8(%rbp), %rdi
movq 0x61fe(%rip), %rax      # 0xafd0
movq (%rax), %rax
movq %rax, -0xd8(%rbp)
addq $0x10, %rdi
callq 0x20e0
movq -0xd8(%rbp), %rdi
movq %rax, %rdx
leaq 0x24bb(%rip), %rsi      # 0x72b1
movb $0x0, %al
callq 0x2310
movb $0x1, -0x1(%rbp)
movl $0x1, -0x8c(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x2458
leaq -0x48(%rbp), %rdi
callq 0x2458
jmp 0x4e2a
leaq -0x48(%rbp), %rdi
callq 0x2458
jmp 0x4e38
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xe0, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x23c0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)