Function at 0x1400503b0
Capabilities:
Create process on windows
Delete file

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
lea rbp, [rsp - 0x15b0]
mov eax, 0x16b0
call fcn.14016aee0
sub rsp, rax
mov rax, qword [0x1401f41c0]
xor rax, rsp
mov qword [rbp + 0x15a0], rax
mov rdi, rcx
xor esi, esi
lea rdx, [rbp + 0x10]
call fcn.1400501d0
nop
cmp qword [rbp + 0x20], rsi
jne 0x140050473
call fcn.140067ee0
lea rdx, str.UpdateUsingCurl.doUpdate:_Build_FTP_URL_failed.
mov rcx, rax
call fcn.140067c40
nop
mov rdx, qword [rbp + 0x28]
cmp rdx, 0xf
jbe 0x14005044b
inc rdx
mov rcx, qword [rbp + 0x10]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140050446
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140050a0e
call fcn.14016aab8
mov rcx, qword [rbp + 0x15a0]
xor rcx, rsp
call fcn.14016ab50
lea r11, [rsp + 0x16b0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
mov byte [rbp + 0x160], 0
xor edx, edx
mov r8d, 0x103
lea rcx, [rbp + 0x161]
call fcn.140191ec0
lea rdx, [rbp + 0x160]
lea rcx, [0x14019d620]
call fcn.14005a030
mov byte [rbp + 0x380], 0
xor edx, edx
mov r8d, 0x103
lea rcx, [rbp + 0x381]
call fcn.140191ec0
lea rdx, [rbp + 0x380]
lea rcx, [0x1401a2528]
call fcn.14005a030
lea rdx, [rbp + 0x160]
mov ecx, VarBstrCmp
call fcn.14003fd00
test eax, eax
jne 0x1400504f5
call fcn.140067ee0
lea rdx, str.UpdateUsingCurl.doUpdate:_Extract_curl.exe_failed
jmp 0x140050407
lea rdx, [rbp + 0x380]
mov ecx, VarBstrCmp
call fcn.14003fd00
test eax, eax
jne 0x14005051b
call fcn.140067ee0
lea rdx, str.UpdateUsingCurl.doUpdate:_Extract_bundle_cert_failed
jmp 0x140050407
mov byte [rbp + 0x50], 0
xor edx, edx
mov r8d, 0x103
lea rcx, [rbp + 0x51]
call fcn.140191ec0
mov r8d, 0x104
lea rdx, [rbp + 0x50]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rcx, [rbp + 0x50]
mov rax, 0xffffffffffffffff
nop dword [rax]
inc rax
cmp byte [rcx + rax], 0
jne 0x140050550
test rax, rax
je 0x140050571
nop
cmp byte [rbp + rax + 0x50], 0x5c
je 0x14005078e
sub rax, 1
jne 0x140050560
mov byte [rbp + 0x270], 0
xor edx, edx
mov r8d, 0x103
lea rcx, [rbp + 0x271]
call fcn.140191ec0
lea rbx, [rdi + 0x28]
mov rcx, qword [rbx + 0x10]
movabs rax, 0x7fffffffffffffff
sub rax, rcx
cmp rax, 4
jb 0x140050a14
mov r9, rbx
cmp qword [rbx + 0x18], 0xf
jbe 0x1400505b8
mov r9, qword [rbx]
mov qword [rsp + 0x30], 4
lea rax, [0x1401a25a8]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
mov r8, rbx
movzx edx, byte [rsp + 0x54]
lea rcx, [rbp - 0x10]
call fcn.1400500a0
nop
lea rcx, [rbp - 0x10]
cmp qword [rbp + 8], 0xf
cmova rcx, qword [rbp - 0x10]
lea rdx, [rbp + 0x270]
call fcn.14005a030
lea rcx, [rbp + 0x270]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
mov byte [rbp + 0x5a0], 0
xor edx, edx
mov r8d, 0xfff
lea rcx, [rbp + 0x5a1]
call fcn.140191ec0
lea rdx, [rbp + 0x10]
cmp qword [rbp + 0x28], 0xf
cmova rdx, qword [rbp + 0x10]
lea rcx, [rdi + 0x68]
cmp qword [rcx + 0x18], 0xf
jbe 0x140050642
mov rcx, qword [rcx]
lea rax, [rdi + 0x48]
cmp qword [rax + 0x18], 0xf
jbe 0x140050650
mov rax, qword [rax]
lea r8, [rbp + 0x270]
mov qword [rsp + 0x38], r8
mov qword [rsp + 0x30], rdx
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x160]
lea r8, str.__s___u__s:_s__s__o___s_
mov edx, 0x1000
lea rcx, [rbp + 0x5a0]
call fcn.140040fd0
call fcn.140067ee0
lea r8, [rbp + 0x5a0]
lea rdx, str.UpdateUsingCurl.doUpdate:_cmd_s
mov rcx, rax
call fcn.140067c10
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x7c], xmm0
movups xmmword [rbp - 0x6c], xmm0
movups xmmword [rbp - 0x5c], xmm0
movups xmmword [rbp - 0x4c], xmm0
movups xmmword [rbp - 0x3c], xmm0
movups xmmword [rbp - 0x2c], xmm0
mov dword [rbp - 0x1c], eax
mov dword [rbp - 0x80], 0x68
movups xmmword [rsp + 0x58], xmm0
mov qword [rsp + 0x68], rax
lea rax, [rsp + 0x58]
mov qword [rsp + 0x48], rax
lea rax, [rbp - 0x80]
mov qword [rsp + 0x40], rax
lea rax, [rbp + 0x50]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], esi
xor r9d, r9d
xor r8d, r8d
lea rdx, [rbp + 0x5a0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x1400507a7
call fcn.140067ee0
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.UpdateUsingCurl.doUpdate:_Run_curl_failed___d
mov rcx, rbx
call fcn.140067c40
nop
mov rdx, qword [rbp + 8]
cmp rdx, 0xf
jbe 0x140050778
inc rdx
mov rcx, qword [rbp - 0x10]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140050773
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140050a08
call fcn.14016aab8
movdqa xmm0, xmmword [0x14019ba70]
movdqu xmmword [rbp], xmm0
mov byte [rbp - 0x10], 0
jmp 0x140050410
inc rax
cmp rax, 0x104
jae 0x140050a1a
mov byte [rbp + rax + 0x50], 0
jmp 0x140050571
call fcn.140067ee0
lea rdx, str.UpdateUsingCurl.doUpdate:_Wait_for_curl_to_download...
mov rcx, rax
call fcn.140067c10
mov edx, 0xffffffff
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call fcn.140067ee0
lea rdx, str.UpdateUsingCurl.doUpdate:_curl_exit
mov rcx, rax
call fcn.140067c10
lea rdx, [rsp + 0x50]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xorps xmm0, xmm0
movups xmmword [rbp + 0x30], xmm0
mov qword [rbp + 0x40], 7
mov esi, reloc.WS2_32.dll_ntohs
mov qword [rbp + 0x48], rsi
mov rax, qword [0x1401a2688]
mov dword [rbp + 0x30], eax
movzx eax, word [0x1401a268c]
mov word [rbp + 0x34], ax
movzx eax, byte [reloc.WS2_32.dll_WSAStartup]
mov byte [rbp + 0x36], al
mov byte [rbp + 0x37], 0
cmp dword [rsp + 0x50], 0
je 0x140050880
mov qword [rbp + 0x40], 6
mov eax, dword [str.Failed]
mov dword [rbp + 0x30], eax
movzx eax, word [0x1401a2694]
mov word [rbp + 0x34], ax
mov byte [rbp + 0x36], 0
call fcn.140067ee0
mov r8d, dword [rsp + 0x50]
lea rdx, str.UpdateUsingCurl.doUpdate:_Download_failed___d
mov rcx, rax
call fcn.140067c40
call fcn.140067ee0
lea rdx, str.UpdateUsingCurl.doUpdate:_Try_to_send_warning_to_AgentService
mov rcx, rax
call fcn.140067c10
lea rdx, [rbp - 0x10]
cmp qword [rbp + 8], 0xf
cmova rdx, qword [rbp - 0x10]
mov ecx, dword [rsp + 0x50]
call fcn.14000d170
mov rdx, rax
mov rcx, qword [0x1401f9048]
call fcn.1400133e0
call fcn.140067ee0
lea rdx, str.UpdateUsingCurl.doUpdate:_Send_warning_to_AgentService_done
mov rcx, rax
call fcn.140067c10
lea rcx, [rbp + 0x380]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, 0x1f4
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rcx, [rbp + 0x160]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp dword [rsp + 0x50], 0
jne 0x140050981
call fcn.140067ee0
lea rdx, str.UpdateUsingCurl.doUpdate:_Download_success.
mov rcx, rax
call fcn.140067e40
cmp byte [rdi], 0
jne 0x14005093f
mov rdx, qword [0x1401f9050]
lea rcx, [rsp + 0x70]
call fcn.140080bf0
cmp qword [rbx + 0x18], 0xf
jbe 0x140050932
mov rbx, qword [rbx]
mov rdx, rbx
lea rcx, [rsp + 0x70]
call fcn.1400812f0
xor edx, edx
mov r8d, 0x104
lea rcx, [rbp + 0x490]
call fcn.140191ec0
lea r9, [rbp + 0x270]
lea r8, [0x1401a0d04]
mov edx, 0x104
lea rcx, [rbp + 0x490]
call fcn.140040fd0
xor edx, edx
lea rcx, [rbp + 0x490]
call fcn.140066840
nop
mov rdx, qword [rbp + 8]
cmp rdx, 0xf
jbe 0x1400509b8
inc rdx
mov rcx, qword [rbp - 0x10]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400509b3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140050a08
call fcn.14016aab8
movdqa xmm0, xmmword [0x14019ba70]
movdqu xmmword [rbp], xmm0
mov byte [rbp - 0x10], 0
mov rdx, qword [rbp + 0x28]
cmp rdx, 0xf
jbe 0x14005044b
inc rdx
mov rcx, qword [rbp + 0x10]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140050446
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140050a0e
jmp 0x140050446
call fcn.140170de4
nop
call fcn.140170de4
nop
call fcn.140004500
int3
call fcn.14016b180
int3