Function at 0x1400133f0
Capabilities:
Resolve dns

Disassembly:
push rbx
push rsi
push r12
sub rsp, 0x130
mov rax, qword [0x1400d1608]
xor rax, rsp
mov qword [rsp + 0x100], rax
mov r12, r8
mov rsi, rdx
mov rbx, rcx
test rcx, rcx
je 0x140013b34
test rdx, rdx
je 0x140013b34
test r8, r8
je 0x140013b34
mov qword [r8], rcx
mov qword [rsp + 0x110], r15
xor r15d, r15d
mov ecx, 0x1000
mov qword [r8 + 0x10], 0x1000
mov qword [r8 + 0x18], r15
call fcn.140073404
mov qword [r12 + 8], rax
test rax, rax
jne 0x14001349d
lea r8, str.prepare_cgi_environment
lea rdx, str._s:_Not_enough_memory_for_environmental_buffer
mov rcx, rbx
call fcn.14000e440
or eax, 0xffffffff
mov r15, qword [rsp + 0x110]
mov rcx, qword [rsp + 0x100]
xor rcx, rsp
call fcn.14006f1f0
add rsp, 0x130
pop r12
pop rsi
pop rbx
ret
mov ecx, 0x8000
mov qword [r12 + 0x28], 0x100
mov qword [r12 + 0x30], r15
call fcn.140073404
mov qword [r12 + 0x20], rax
test rax, rax
jne 0x1400134e1
lea r8, str.prepare_cgi_environment
lea rdx, str._s:_Not_enough_memory_for_environmental_variables
mov rcx, rbx
call fcn.14000e440
mov rcx, qword [r12 + 8]
call fcn.1400733f0
jmp 0x140013476
mov r8, qword [rbx + 0x8d0]
lea rdx, str.SERVER_NAME_s
mov rcx, r12
mov r8, qword [r8 + 0xa8]
mov qword [rsp + 0x168], rbp
mov qword [rsp + 0x128], rdi
call fcn.140013260
mov r8, qword [rbx + 0x8d0]
lea rdx, str.SERVER_ROOT_s
mov r8, qword [r8 + 0x78]
mov rcx, r12
call fcn.140013260
mov r8, qword [rbx + 0x8d0]
lea rdx, str.DOCUMENT_ROOT_s
mov r8, qword [r8 + 0x78]
mov rcx, r12
call fcn.140013260
lea r8, [0x1400a23c0]
lea rdx, str.SERVER_SOFTWARECivetWeb__s
mov rcx, r12
call fcn.140013260
lea r8, str.GATEWAY_INTERFACECGI_1.1
lea rdx, [0x1400a24e0]
mov rcx, r12
call fcn.140013260
lea r8, str.SERVER_PROTOCOLHTTP_1.1
lea rdx, [0x1400a24e0]
mov rcx, r12
call fcn.140013260
lea r8, str.REDIRECT_STATUS200
lea rdx, [0x1400a24e0]
mov rcx, r12
call fcn.140013260
movzx ecx, word [rbx + 0x8fa]
call qword [sym.imp.WS2_32.dll_ntohs]
lea rdx, str.SERVER_PORT_d
mov rcx, r12
movzx r8d, ax
call fcn.140013260
lea rcx, [rbx + 0x908]
mov byte [rsp + 0x48], r15b
test rcx, rcx
je 0x1400135f8
cmp word [rcx], 2
jne 0x1400135f8
mov r9d, gethostbyname
mov dword [rsp + 0x30], 2
lea r8, [rsp + 0x48]
lea edx, [r9 - 0x22]
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], r15
call qword [sym.imp.WS2_32.dll_getnameinfo]
lea r8, [rsp + 0x48]
lea rdx, str.REMOTE_ADDR_s
mov rcx, r12
call fcn.140013260
mov r8, qword [rbx + 8]
lea rdx, str.REQUEST_METHOD_s
mov rcx, r12
call fcn.140013260
mov r8d, dword [rbx + 0x70]
lea rdx, str.REMOTE_PORT_d
mov rcx, r12
call fcn.140013260
mov r8, qword [rbx + 0x10]
lea rdx, str.REQUEST_URI_s
mov rcx, r12
call fcn.140013260
mov r8, qword [rbx + 0x18]
lea rdx, str.LOCAL_URI_s
mov rcx, r12
call fcn.140013260
mov r9, qword [rbx + 0x18]
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r9
repne scasb al, byte [rdi]
mov rdi, qword [rbx + 0x968]
not rcx
dec rcx
mov rdx, rcx
test rdi, rdi
jne 0x1400136c6
movsxd rax, ecx
cmp byte [rax + r9 - 1], 0x2f
je 0x14001369b
lea rdx, str.SCRIPT_NAME_s
mov r8, r9
mov rcx, r12
call fcn.140013260
jmp 0x1400136e6
mov edx, 0x2f
mov rcx, rsi
call fcn.140070968
test rax, rax
je 0x1400136e6
mov r8, qword [rbx + 0x18]
lea r9, [rax + 1]
lea rdx, str.SCRIPT_NAME_s_s
mov rcx, r12
call fcn.140013260
jmp 0x1400136e6
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
not rcx
dec rcx
sub edx, ecx
mov rcx, r12
mov r8d, edx
lea rdx, str.SCRIPT_NAME_.s
call fcn.140013260
lea rdx, str.SCRIPT_FILENAME_s
mov r8, rsi
mov rcx, r12
call fcn.140013260
mov r9, qword [rbx + 0x968]
mov r8, qword [rbx + 0x8d0]
mov r8, qword [r8 + 0x78]
mov rcx, r12
test r9, r9
jne 0x140013720
lea rdx, str.PATH_TRANSLATED_s
call fcn.140013260
jmp 0x14001372c
lea rdx, str.PATH_TRANSLATED_s_s
call fcn.140013260
cmp qword [rbx + 0x8e0], r15
lea rax, [0x1400a3d30]
lea r8, [0x1400a3d2c]
lea rdx, str.HTTPS_s
mov rcx, r12
cmove r8, rax
call fcn.140013260
mov edx, dword [rbx]
cmp edx, 1
jne 0x14001376a
mov edx, dword [rbx + 0x88]
lea rcx, [rbx + 0x90]
jmp 0x14001377c
cmp edx, 2
jne 0x14001379f
mov edx, dword [rbx + 0x4c0]
lea rcx, [rbx + 0x4c8]
lea r8, str.Content_Type
call fcn.1400088c0
test rax, rax
je 0x14001379f
lea rdx, str.CONTENT_TYPE_s
mov r8, rax
mov rcx, r12
call fcn.140013260
mov r8, qword [rbx + 0x28]
test r8, r8
je 0x1400137b7
lea rdx, str.QUERY_STRING_s
mov rcx, r12
call fcn.140013260
mov eax, dword [rbx]
cmp eax, 1
jne 0x1400137cd
mov edx, dword [rbx + 0x88]
lea rcx, [rbx + 0x90]
jmp 0x1400137df
cmp eax, 2
jne 0x140013802
mov edx, dword [rbx + 0x4c0]
lea rcx, [rbx + 0x4c8]
lea r8, str.Content_Length
call fcn.1400088c0
test rax, rax
je 0x140013802
lea rdx, str.CONTENT_LENGTH_s
mov r8, rax
mov rcx, r12
call fcn.140013260
lea rcx, [0x1400a3cd0]
call fcn.14007e118
test rax, rax
je 0x140013825
lea rdx, str.PATH_s
mov r8, rax
mov rcx, r12
call fcn.140013260
mov r8, qword [rbx + 0x968]
test r8, r8
je 0x140013840
lea rdx, str.PATH_INFO_s
mov rcx, r12
call fcn.140013260
mov r8d, dword [rbx + 0x98c]
test r8d, r8d
jle 0x14001385b
lea rdx, str.STATUS_d
mov rcx, r12
call fcn.140013260
lea rcx, [0x1400a3ca0]
call fcn.14007e118
test rax, rax
je 0x14001387e
lea rdx, str.COMSPEC_s
mov r8, rax
mov rcx, r12
call fcn.140013260
lea rcx, str.SYSTEMROOT
call fcn.14007e118
test rax, rax
je 0x1400138a1
lea rdx, str.SYSTEMROOT_s
mov r8, rax
mov rcx, r12
call fcn.140013260
lea rcx, str.SystemDrive
call fcn.14007e118
test rax, rax
je 0x1400138c4
lea rdx, str.SystemDrive_s
mov r8, rax
mov rcx, r12
call fcn.140013260
lea rcx, str.ProgramFiles
call fcn.14007e118
test rax, rax
je 0x1400138e7
lea rdx, str.ProgramFiles_s
mov r8, rax
mov rcx, r12
call fcn.140013260
lea rcx, str.ProgramFiles_x86_
call fcn.14007e118
test rax, rax
je 0x14001390a
lea rdx, str.ProgramFiles_x86__s
mov r8, rax
mov rcx, r12
call fcn.140013260
lea rcx, str.PERLLIB
call fcn.14007e118
test rax, rax
je 0x14001392d
lea rdx, str.PERLLIB_s
mov r8, rax
mov rcx, r12
call fcn.140013260
mov r8, qword [rbx + 0x30]
test r8, r8
je 0x14001395b
lea rdx, str.REMOTE_USER_s
mov rcx, r12
call fcn.140013260
lea r8, str.AUTH_TYPEDigest
lea rdx, [0x1400a24e0]
mov rcx, r12
call fcn.140013260
mov ebp, r15d
cmp dword [rbx + 0x88], r15d
jle 0x140013a4c
mov qword [rsp + 0x120], r13
mov qword [rsp + 0x118], r14
lea rsi, [rbx + 0x90]
lea r14, str.HTTP__s
mov r13d, 0x5f
nop
mov rax, qword [rsi]
lea r8, [rsp + 0x80]
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov r9d, 0x80
mov rcx, rbx
mov qword [rsp + 0x20], r14
call fcn.140011520
cmp dword [rsp + 0x40], r15d
je 0x1400139da
mov r9, qword [rsi]
lea r8, str.prepare_cgi_environment
lea rdx, str._s:_HTTP_header_variable_too_long___s_
mov rcx, rbx
call fcn.14000e440
jmp 0x140013a2a
lea rdi, [rsp + 0x80]
cmp byte [rsp + 0x80], r15b
je 0x140013a0f
nop dword [rax]
movzx eax, byte [rdi]
cmp byte [rdi], 0x2d
cmove eax, r13d
movzx ecx, al
mov byte [rdi], al
call fcn.14007f290
inc rdi
mov byte [rdi - 1], al
cmp byte [rdi], r15b
jne 0x1400139f0
mov r9, qword [rsi + 8]
lea r8, [rsp + 0x80]
lea rdx, [0x1400a3b84]
mov rcx, r12
call fcn.140013260
inc ebp
add rsi, 0x10
cmp ebp, dword [rbx + 0x88]
jl 0x140013990
mov r14, qword [rsp + 0x118]
mov r13, qword [rsp + 0x120]
mov rax, qword [rbx + 0x8d0]
mov rbp, qword [rsp + 0x168]
mov rdi, qword [rax + 0x88]
test rdi, rdi
je 0x140013b09
cmp byte [rdi], r15b
je 0x140013b09
movzx eax, byte [rdi]
cmp al, 0x20
je 0x140013a7f
cmp al, 9
jne 0x140013a84
inc rdi
jmp 0x140013a74
mov edx, 0x2c
mov rcx, rdi
mov rbx, rdi
call fcn.14006fd18
mov rdi, rax
test rax, rax
je 0x140013aa4
sub rax, rbx
inc rdi
jmp 0x140013abd
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasb al, byte [rdi]
not rcx
dec rcx
lea rdi, [rbx + rcx]
mov rax, rdi
sub rax, rbx
lea edx, [rax - 1]
movsxd rax, edx
test edx, edx
js 0x140013adc
movzx ecx, byte [rax + rbx]
cmp cl, 0x20
je 0x140013ad5
cmp cl, 9
jne 0x140013adc
dec edx
dec rax
jns 0x140013ac7
lea eax, [rdx + 1]
movsxd rcx, eax
test eax, eax
je 0x140013a62
test rdi, rdi
je 0x140013b09
mov r8d, ecx
lea rdx, str._.s
mov r9, rbx
mov rcx, r12
call fcn.140013260
jmp 0x140013a62
mov rcx, qword [r12 + 0x30]
mov rax, qword [r12 + 0x20]
mov rdi, qword [rsp + 0x128]
mov qword [rax + rcx*8], r15
mov rax, qword [r12 + 8]
mov rcx, qword [r12 + 0x18]
mov byte [rcx + rax], r15b
xor eax, eax
jmp 0x140013479
or eax, 0xffffffff
jmp 0x140013481