Function at 0x487f70
Capabilities:
Read file on windows

Disassembly:
mov r11, rsp
sub rsp, 0x2f8
mov rax, qword [0x005c3458]
mov qword [rsp + 0x2a0], rax
mov qword [r11 - 8], rbx
mov qword [r11 - 0x28], r12
mov qword [r11 - 0x38], r14
mov qword [r11 - 0x40], r15
xor r15d, r15d
test rdx, rdx
mov qword [rsp + 0x58], r9
mov rbx, r8
mov r14, rdx
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x38], r15
mov r12, r15
mov qword [rsp + 0x48], r15
mov qword [rcx], r15
mov qword [rsp + 0x50], rcx
jne 0x487fcd
xor eax, eax
jmp 0x488b92
mov ecx, 0x29
mov qword [rsp + 0x2e8], rbp
mov qword [rsp + 0x2e0], rsi
call qword [sub.msvcrt.dll_malloc]
test rax, rax
mov rsi, rax
mov qword [rsp + 0x40], rax
je 0x4880b7
lea rbp, [0x00400000]
mov qword [rsp + 0x2d8], rdi
mov rcx, 0xffffffffffffffff
mov rax, qword [rbp + 0x173658]
mov rdi, rsi
mov qword [rsi], rax
mov rax, qword [rbp + 0x173660]
mov qword [rsi + 8], rax
mov rax, qword [rbp + 0x173668]
mov qword [rsi + 0x10], rax
mov eax, dword [rbp + 0x173670]
mov dword [rsi + 0x18], eax
movzx eax, byte [rbp + 0x173674]
mov byte [rsi + 0x1c], al
xor eax, eax
repne scasb al, byte [rdi]
not rcx
dec rcx
cmp rcx, 0x28
mov rdi, rcx
jae 0x488077
call fcn.0048bcc0
inc rdi
mov edx, eax
and edx, 0xf
cmp rdi, 0x28
movzx eax, byte [rdx + rbp + 0x1735f0]
mov byte [rdi + rsi - 1], al
jb 0x488058
lea r9, str.Content_Type:_multipart_form_data
test rbx, rbx
lea r8, str._s__boundary_s_r_n
cmovne r9, rbx
lea rcx, [rsp + 0x30]
xor edx, edx
mov byte [rsi + 0x28], r12b
mov qword [rsp + 0x20], rsi
call fcn.00487910
test eax, eax
mov edi, eax
je 0x4880c1
mov rcx, rsi
call qword [sub.msvcrt.dll_free]
mov eax, edi
jmp 0x488b7a
mov eax, 0x1b
jmp 0x488b82
mov qword [rsp + 0x2c8], r13
mov r13, qword [rsp + 0x30]
nop
cmp qword [rsp + 0x38], 0
je 0x4880f8
lea r8, [0x0055bc60]
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x30]
call fcn.00487910
test eax, eax
mov ebp, eax
jne 0x4888f4
lea r8, str.___s_r_n
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x30]
mov r9, rsi
call fcn.00487910
test eax, eax
mov ebp, eax
jne 0x4888f4
lea r8, str.Content_Disposition:_form_data__name_
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x30]
call fcn.00487910
test eax, eax
mov ebp, eax
jne 0x4888f4
mov rsi, qword [r14 + 8]
movsxd rdi, dword [r14 + 0x10]
lea ecx, [rax + 0x20]
call qword [sub.msvcrt.dll_malloc]
test rax, rax
mov rbx, rax
je 0x488954
test rdi, rdi
mov qword [rax], r15
jne 0x488175
xor eax, eax
mov rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasb al, byte [rdi]
not rcx
lea rdi, [rcx - 1]
lea rcx, [rdi + 1]
call qword [sub.msvcrt.dll_malloc]
test rax, rax
mov qword [rbx + 0x10], rax
je 0x488960
mov r8, rdi
mov rdx, rsi
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [rbx + 0x10]
mov qword [rbx + 0x18], rdi
mov byte [rdi + rax], 0
mov rax, qword [rsp + 0x30]
mov dword [rbx + 8], 0
test rax, rax
je 0x4881c1
mov qword [rax], rbx
mov qword [rsp + 0x30], rbx
jmp 0x4881c6
mov qword [rsp + 0x30], rbx
add qword [rsp + 0x38], rdi
lea r8, [0x00573738]
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x30]
call fcn.00487910
test eax, eax
mov ebp, eax
jne 0x488a96
cmp qword [r14 + 0x48], 0
je 0x4882bd
lea ecx, [rax + 0x29]
call qword [sub.msvcrt.dll_malloc]
test rax, rax
mov r12, rax
mov qword [rsp + 0x48], rax
jne 0x488216
mov qword [rsp + 0x48], rax
jmp 0x48829a
lea rbx, [0x00400000]
mov rcx, 0xffffffffffffffff
mov rdi, r12
mov rax, qword [rbx + 0x173658]
mov qword [r12], rax
mov rax, qword [rbx + 0x173660]
mov qword [r12 + 8], rax
mov rax, qword [rbx + 0x173668]
mov qword [r12 + 0x10], rax
mov eax, dword [rbx + 0x173670]
mov dword [r12 + 0x18], eax
movzx eax, byte [rbx + 0x173674]
mov byte [r12 + 0x1c], al
xor eax, eax
repne scasb al, byte [rdi]
not rcx
dec rcx
cmp rcx, 0x28
mov rdi, rcx
jae 0x488294
call fcn.0048bcc0
inc rdi
mov edx, eax
and edx, 0xf
cmp rdi, 0x28
movzx eax, byte [rdx + rbx + 0x1735f0]
mov byte [rdi + r12 - 1], al
jb 0x488274
mov byte [r12 + 0x28], 0
lea r8, str._r_nContent_Type:_multipart_mixed__boundary_s_r_n
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x30]
mov r9, r12
call fcn.00487910
test eax, eax
mov ebp, eax
jne 0x488aa0
mov r15, r14
cmp qword [r14 + 0x48], 0
je 0x4883d8
xor edi, edi
cmp qword [r15 + 0x58], rdi
jne 0x488351
mov rcx, qword [r15 + 0x18]
call qword [case.0x49474c.1]
test rax, rax
mov rsi, rax
je 0x488a0b
mov edx, gethostbyaddr
mov rcx, rax
mov rdi, rax
call qword [sym.imp.msvcrt.dll_strrchr]
mov edx, 0x5c
mov rcx, rdi
mov rbx, rax
call qword [sym.imp.msvcrt.dll_strrchr]
test rbx, rbx
je 0x48832a
test rax, rax
je 0x488324
cmp rbx, rax
mov rdi, rax
cmova rdi, rbx
inc rdi
jmp 0x488333
lea rdi, [rbx + 1]
jmp 0x488333
test rax, rax
je 0x488333
lea rdi, [rax + 1]
mov rcx, rdi
call qword [case.0x49474c.1]
mov rcx, rsi
mov rdi, rax
call qword [sub.msvcrt.dll_free]
test rdi, rdi
je 0x488a0b
mov rax, qword [r15 + 0x58]
mov rdx, rdi
lea r8, str._r_n___s_r_nContent_Disposition:_attachment__filename__s_
test rax, rax
lea rcx, [rsp + 0x30]
mov r9, r12
cmovne rdx, rax
mov qword [rsp + 0x20], rdx
lea rdx, [rsp + 0x38]
call fcn.00487910
test rdi, rdi
mov ebp, eax
je 0x48838d
mov rcx, rdi
call qword [sub.msvcrt.dll_free]
test ebp, ebp
je 0x48849f
test r13, r13
je 0x4883c6
nop
nop
cmp dword [r13 + 8], 1
mov rdi, qword [r13]
jg 0x4883b5
mov rcx, qword [r13 + 0x10]
call qword [sub.msvcrt.dll_free]
mov rcx, r13
call qword [sub.msvcrt.dll_free]
test rdi, rdi
mov r13, rdi
jne 0x4883a0
mov rcx, qword [rsp + 0x40]
call qword [sub.msvcrt.dll_free]
mov eax, ebp
jmp 0x488b72
test byte [r14 + 0x50], 0x51
je 0x48849f
cmp qword [r14 + 0x58], 0
jne 0x488461
mov rcx, qword [r14 + 0x18]
call qword [case.0x49474c.1]
test rax, rax
mov rsi, rax
jne 0x488400
xor edi, edi
jmp 0x488463
mov edx, gethostbyaddr
mov rcx, rax
mov rdi, rax
call qword [sym.imp.msvcrt.dll_strrchr]
mov edx, 0x5c
mov rcx, rsi
mov rbx, rax
call qword [sym.imp.msvcrt.dll_strrchr]
test rbx, rbx
je 0x488441
test rax, rax
je 0x48843b
cmp rbx, rax
mov rdi, rax
cmova rdi, rbx
inc rdi
jmp 0x48844a
lea rdi, [rbx + 1]
jmp 0x48844a
test rax, rax
je 0x48844a
lea rdi, [rax + 1]
mov rcx, rdi
call qword [case.0x49474c.1]
mov rcx, rsi
mov rdi, rax
call qword [sub.msvcrt.dll_free]
jmp 0x488463
xor edi, edi
mov rax, qword [r14 + 0x58]
mov r9, rdi
lea r8, str.__filename__s_
test rax, rax
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x30]
cmovne r9, rax
call fcn.00487910
test rdi, rdi
mov ebp, eax
je 0x488497
mov rcx, rdi
call qword [sub.msvcrt.dll_free]
test ebp, ebp
jne 0x488395
mov r9, qword [r15 + 0x38]
test r9, r9
je 0x4884c8
lea r8, str._r_nContent_Type:__s
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x30]
call fcn.00487910
test eax, eax
mov ebp, eax
jne 0x488395
mov rdi, qword [r15 + 0x40]
test rdi, rdi
je 0x4884fd
mov r9, qword [rdi]
lea r8, str._r_n_s
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x30]
call fcn.00487910
test eax, eax
mov ebp, eax
jne 0x488a4b
mov rdi, qword [rdi + 8]
test rdi, rdi
jne 0x4884d1
test ebp, ebp
jne 0x488a4b
lea r8, str._r_n_r_n
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x30]
call fcn.00487910
test eax, eax
mov ebp, eax
jne 0x488395
mov eax, dword [r14 + 0x50]
test al, 1
jne 0x4886ee
test al, 2
jne 0x4886ee
test al, 0x10
je 0x4885e6
mov rsi, qword [r14 + 0x28]
movsxd rdi, dword [r14 + 0x30]
lea ecx, [rbp + 0x20]
call qword [sub.msvcrt.dll_malloc]
test rax, rax
mov rbx, rax
je 0x488978
test rdi, rdi
mov qword [rax], 0
jne 0x48857f
xor eax, eax
mov rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasb al, byte [rdi]
not rcx
lea rdi, [rcx - 1]
lea rcx, [rdi + 1]
call qword [sub.msvcrt.dll_malloc]
test rax, rax
mov qword [rbx + 0x10], rax
je 0x488982
mov r8, rdi
mov rdx, rsi
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [rbx + 0x10]
mov qword [rbx + 0x18], rdi
mov byte [rdi + rax], 0
mov rax, qword [rsp + 0x30]
mov dword [rbx + 8], 1
test rax, rax
je 0x4885d5
add qword [rsp + 0x38], rdi
mov qword [rax], rbx
mov qword [rsp + 0x30], rbx
xor ebp, ebp
jmp 0x4888ae
add qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rbx
xor ebp, ebp
jmp 0x4888ae
test al, 0x40
je 0x488647
mov rdi, qword [r14 + 0x60]
movsxd rbx, dword [r14 + 0x20]
mov ecx, 0x20
call qword [sub.msvcrt.dll_malloc]
test rax, rax
je 0x488995
mov rcx, qword [rsp + 0x30]
mov qword [rax], 0
mov qword [rax + 0x10], rdi
test rcx, rcx
mov dword [rax + 8], 2
je 0x488636
add qword [rsp + 0x38], rbx
mov qword [rcx], rax
mov qword [rsp + 0x30], rax
xor ebp, ebp
jmp 0x4888ae
add qword [rsp + 0x38], rbx
mov qword [rsp + 0x30], rax
xor ebp, ebp
jmp 0x4888ae
mov rsi, qword [r14 + 0x18]
movsxd rdi, dword [r14 + 0x20]
mov ecx, 0x20
call qword [sub.msvcrt.dll_malloc]
test rax, rax
mov rbx, rax
je 0x48899f
test rdi, rdi
mov qword [rax], 0
jne 0x488687
xor eax, eax
mov rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasb al, byte [rdi]
not rcx
lea rdi, [rcx - 1]
lea rcx, [rdi + 1]
call qword [sub.msvcrt.dll_malloc]
test rax, rax
mov qword [rbx + 0x10], rax
je 0x4889a9
mov r8, rdi
mov rdx, rsi
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov rax, qword [rbx + 0x10]
mov qword [rbx + 0x18], rdi
mov byte [rdi + rax], 0
mov rax, qword [rsp + 0x30]
mov dword [rbx + 8], 1
test rax, rax
je 0x4886dd
add qword [rsp + 0x38], rdi
mov qword [rax], rbx
mov qword [rsp + 0x30], rbx
xor ebp, ebp
jmp 0x4888ae
add qword [rsp + 0x38], rdi
mov qword [rsp + 0x30], rbx
xor ebp, ebp
jmp 0x4888ae
mov rdx, qword [r15 + 0x18]
lea rcx, [0x0055c420]
call fcn.0048a3e0
test eax, eax
je 0x48870e
mov rax, qword [sym.imp.msvcrt.dll__iob]
mov r12, rax
jmp 0x488729
mov rcx, qword [r15 + 0x18]
lea rdx, [0x0055bca4]
call qword [sym.imp.msvcrt.dll_fopen]
mov r12, rax
mov rax, qword [sym.imp.msvcrt.dll__iob]
test r12, r12
je 0x488b28
cmp r12, rax
je 0x4887c2
mov rcx, r12
call qword [sym.imp.msvcrt.dll_fclose]
mov rbx, qword [r15 + 0x18]
mov ecx, 0x20
call qword [sub.msvcrt.dll_malloc]
test rax, rax
mov rdi, rax
je 0x4889c5
mov qword [rax], 0
mov qword [rax + 0x10], rbx
mov dword [rax + 8], 3
mov rax, qword [rsp + 0x30]
test rax, rax
je 0x488785
mov qword [rax], rdi
mov qword [rsp + 0x30], rdi
jmp 0x48878a
mov qword [rsp + 0x30], rdi
mov rdx, qword [rdi + 0x10]
lea rcx, [0x0055c420]
call fcn.0048a3e0
test eax, eax
jne 0x4887bb
mov rcx, qword [rdi + 0x10]
lea rdx, [rsp + 0x60]
call qword [sym.imp.msvcrt.dll__stati64]
test eax, eax
jne 0x4887bb
mov rax, qword [rsp + 0x78]
add qword [rsp + 0x38], rax
xor ebp, ebp
jmp 0x4888ae
lea rcx, [rsp + 0xa0]
mov r9, r12
mov edx, 1
mov r8d, 0x200
call qword [sym.imp.msvcrt.dll_fread]
test rax, rax
mov rdi, rax
je 0x4888ae
mov rsi, qword [rsp + 0x30]
xor ebp, ebp
mov ecx, 0x20
call qword [sub.msvcrt.dll_malloc]
test rax, rax
mov rbx, rax
je 0x4889c5
test rdi, rdi
mov qword [rax], rbp
jne 0x48882a
lea rdi, [rsp + 0xa0]
xor eax, eax
mov rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
not rcx
lea rdi, [rcx - 1]
lea rcx, [rdi + 1]
call qword [sub.msvcrt.dll_malloc]
test rax, rax
mov qword [rbx + 0x10], rax
je 0x4889bc
lea rdx, [rsp + 0xa0]
mov r8, rdi
mov rcx, rax
call sub.msvcrt.dll_memcpy
test rsi, rsi
mov rax, qword [rbx + 0x10]
mov qword [rbx + 0x18], rdi
mov byte [rdi + rax], bpl
mov dword [rbx + 8], 1
je 0x488879
mov qword [rsi], rbx
mov qword [rsp + 0x30], rbx
mov rsi, rbx
jmp 0x488881
mov rsi, rbx
mov qword [rsp + 0x30], rbx
add qword [rsp + 0x38], rdi
lea rcx, [rsp + 0xa0]
mov r9, r12
mov edx, 1
mov r8d, 0x200
call qword [sym.imp.msvcrt.dll_fread]
test rax, rax
mov rdi, rax
jne 0x4887f1
mov r15, qword [r15 + 0x48]
mov r12, qword [rsp + 0x48]
test r15, r15
jne 0x4882c0
cmp qword [r14 + 0x48], 0
je 0x488936
lea r8, str._r_n___s__
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x30]
mov r9, r12
call fcn.00487910
mov rcx, r12
mov ebp, eax
call qword [sub.msvcrt.dll_free]
test ebp, ebp
je 0x48893b
mov rsi, qword [rsp + 0x40]
test r13, r13
je 0x488926
nop
nop
cmp dword [r13 + 8], 1
mov rdi, qword [r13]
jg 0x488915
mov rcx, qword [r13 + 0x10]
call qword [sub.msvcrt.dll_free]
mov rcx, r13
call qword [sub.msvcrt.dll_free]
test rdi, rdi
mov r13, rdi
jne 0x488900
mov rcx, rsi
call qword [sub.msvcrt.dll_free]
mov eax, ebp
jmp 0x488b72
mov r12, qword [rsp + 0x48]
mov r14, qword [r14]
test r14, r14
je 0x488a88
mov rsi, qword [rsp + 0x40]
xor r15d, r15d
jmp 0x4880d0
mov rsi, qword [rsp + 0x40]
mov ebp, 0x1b
jmp 0x4888f4
mov rcx, rbx
call qword [sub.msvcrt.dll_free]
mov rsi, qword [rsp + 0x40]
mov ebp, 0x1b
jmp 0x4888f4
mov ebp, 0x1b
jmp 0x488395
mov rcx, rbx
call qword [sub.msvcrt.dll_free]
mov ebp, 0x1b
jmp 0x488395
mov ebp, 0x1b
jmp 0x488395
mov ebp, 0x1b
jmp 0x488395
mov rcx, rbx
call qword [sub.msvcrt.dll_free]
mov ebp, 0x1b
jmp 0x488395
mov rcx, rbx
call qword [sub.msvcrt.dll_free]
test r13, r13
je 0x4889f6
nop
nop
cmp dword [r13 + 8], 1
mov rdi, qword [r13]
jg 0x4889e5
mov rcx, qword [r13 + 0x10]
call qword [sub.msvcrt.dll_free]
mov rcx, r13
call qword [sub.msvcrt.dll_free]
test rdi, rdi
mov r13, rdi
jne 0x4889d0
mov rcx, qword [rsp + 0x40]
call qword [sub.msvcrt.dll_free]
mov eax, 0x1b
jmp 0x488b72
test r13, r13
je 0x488a36
cmp dword [r13 + 8], 1
mov rdi, qword [r13]
jg 0x488a25
mov rcx, qword [r13 + 0x10]
call qword [sub.msvcrt.dll_free]
mov rcx, r13
call qword [sub.msvcrt.dll_free]
test rdi, rdi
mov r13, rdi
jne 0x488a10
mov rcx, qword [rsp + 0x40]
call qword [sub.msvcrt.dll_free]
mov eax, 0x1b
jmp 0x488b72
test r13, r13
je 0x488a76
cmp dword [r13 + 8], 1
mov rdi, qword [r13]
jg 0x488a65
mov rcx, qword [r13 + 0x10]
call qword [sub.msvcrt.dll_free]
mov rcx, r13
call qword [sub.msvcrt.dll_free]
test rdi, rdi
mov r13, rdi
jne 0x488a50
mov rcx, qword [rsp + 0x40]
call qword [sub.msvcrt.dll_free]
mov eax, ebp
jmp 0x488b72
test ebp, ebp
je 0x488aaa
mov rsi, qword [rsp + 0x40]
jmp 0x4888f4
mov rsi, qword [rsp + 0x40]
jmp 0x4888f4
mov rsi, qword [rsp + 0x40]
jmp 0x4888f4
mov rsi, qword [rsp + 0x40]
lea r8, str._r_n___s___r_n
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x30]
mov r9, rsi
call fcn.00487910
test eax, eax
mov ebx, eax
je 0x488b06
test r13, r13
je 0x488af9
cmp dword [r13 + 8], 1
mov rdi, qword [r13]
jg 0x488ae8
mov rcx, qword [r13 + 0x10]
call qword [sub.msvcrt.dll_free]
mov rcx, r13
call qword [sub.msvcrt.dll_free]
test rdi, rdi
mov r13, rdi
jne 0x488ad3
mov rcx, rsi
call qword [sub.msvcrt.dll_free]
mov eax, ebx
jmp 0x488b72
mov rcx, qword [rsp + 0x58]
mov rax, qword [rsp + 0x38]
mov qword [rcx], rax
mov rcx, rsi
call qword [sub.msvcrt.dll_free]
mov rdx, qword [rsp + 0x50]
mov eax, ebx
mov qword [rdx], r13
jmp 0x488b72
test r13, r13
je 0x488b56
nop
cmp dword [r13 + 8], 1
mov rdi, qword [r13]
jg 0x488b45
mov rcx, qword [r13 + 0x10]
call qword [sub.msvcrt.dll_free]
mov rcx, r13
call qword [sub.msvcrt.dll_free]
test rdi, rdi
mov r13, rdi
jne 0x488b30
mov rcx, qword [rsp + 0x40]
call qword [sub.msvcrt.dll_free]
mov rdx, qword [rsp + 0x50]
mov eax, 0x1a
mov qword [rdx], 0
mov r13, qword [rsp + 0x2c8]
mov rdi, qword [rsp + 0x2d8]
mov rbp, qword [rsp + 0x2e8]
mov rsi, qword [rsp + 0x2e0]
mov r15, qword [rsp + 0x2b8]
mov r14, qword [rsp + 0x2c0]
mov r12, qword [rsp + 0x2d0]
mov rbx, qword [rsp + 0x2f0]
mov rcx, qword [rsp + 0x2a0]
call fcn.005555b0
add rsp, 0x2f8
ret