Function at 0x140001420
Capabilities:
Encrypt data using rc4 via systemfunction032
Get file size
Read file on windows

Disassembly:
push rbp
push r12
push r15
lea rbp, [rsp - 0x20]
sub rsp, 0x120
mov rax, qword [section..data]
xor rax, rsp
mov qword [rbp], rax
xor r15d, r15d
mov r12, rdx
mov qword [rsp + 0x48], r15
cmp ecx, 3
je 0x14000145d
mov rcx, qword [rdx]
call fcn.140001360
jmp 0x140001568
mov rdx, qword [rdx + 0x10]
lea r11, [0x140004a48]
mov r10, r15
nop dword [rax + rax]
mov r9, qword [r10 + r11]
mov rax, rdx
sub r9, rdx
nop word [rax + rax]
movzx r8d, byte [rax]
movzx ecx, byte [rax + r9]
sub r8d, ecx
jne 0x140001495
inc rax
test ecx, ecx
jne 0x140001480
test r8d, r8d
je 0x1400014be
add r10, 8
cmp r10, 0x30
jb 0x140001470
lea rcx, str.__________s__Is_not_Valid_Input_________n
call fcn.140001010
mov rcx, qword [r12]
call fcn.140001360
jmp 0x140001568
mov rcx, qword [r12 + 8]
xor r9d, r9d
mov qword [rsp + 0x140], rbx
xor r8d, r8d
mov qword [rsp + 0x150], rsi
mov edx, 0x80000000
mov qword [rsp + 0x158], rdi
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x118], r13
mov dword [rsp + 0x28], 0x80
mov qword [rsp + 0x110], r14
mov dword [rsp + 0x70], r15d
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x140001581
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140004a98]
lea rcx, str.______s____FAILED____t_d__n
call fcn.140001010
mov eax, 0xffffffff
mov r13, qword [rsp + 0x118]
mov rdi, qword [rsp + 0x158]
mov rsi, qword [rsp + 0x150]
mov rbx, qword [rsp + 0x140]
mov r14, qword [rsp + 0x110]
mov rcx, qword [rbp]
xor rcx, rsp
call fcn.140002750
add rsp, 0x120
pop r15
pop r12
pop rbp
ret
xor edx, edx
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, edi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r8d, edi
xor edx, edx
mov rcx, rax
mov rsi, rax
call sub.VCRUNTIME140.dll_memset
lea r9, [rsp + 0x70]
mov qword [rsp + 0x20], r15
mov r8d, edi
mov rdx, rsi
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400015e4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, [0x140004aa8]
jmp 0x14000152f
mov edi, dword [rsp + 0x70]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rsi, rsi
je 0x14000153b
test edi, edi
je 0x14000153b
mov rdx, qword [r12 + 0x10]
lea r8, [0x1400045dc]
mov r13, rsi
mov qword [rsp + 0x40], rsi
mov rcx, r15
mov ebx, 4
nop
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x1400017db
cmp rcx, rbx
jne 0x140001620
mov eax, 0xaaaaaaab
mul edi
shr edx, 2
lea eax, [rdx + rdx*2]
lea ecx, [rax + rax]
cmp edi, ecx
je 0x14000169d
lea r14d, [rcx + 6]
mov ebx, r14d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, r14d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x40], rax
mov r12, rax
test rax, rax
je 0x14000153b
mov r8d, ebx
mov edx, 0x90
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov r8, rdi
mov rdx, rsi
mov rcx, r12
call sub.VCRUNTIME140.dll_memcpy
mov r13d, r14d
mov rdi, r12
jmp 0x1400016a8
mov r13, rdi
mov qword [rsp + 0x40], rsi
mov rdi, rsi
mov r14, rsi
test r13, r13
je 0x14000153b
movabs rax, 0xaaaaaaaaaaaaaaab
mul r13
mov r12, rdx
shr r12, 2
lea rcx, [r12 + r12*2]
add rcx, rcx
cmp r13, rcx
jne 0x14000153b
lea rcx, str.char_MacArray______n_t
call fcn.140001010
mov ebx, 6
mov esi, r15d
test r13, r13
je 0x1400017b5
lea r8, [rdi + 4]
nop dword [rax]
lea rdi, [r8 + 1]
cmp ebx, 6
jne 0x140001794
movzx ecx, byte [r8]
inc r15d
movzx edx, byte [r8 - 1]
movzx r10d, byte [r8 - 2]
movzx eax, byte [rdi]
movzx r9d, byte [r8 - 3]
movzx r8d, byte [r8 - 4]
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x30], ecx
lea rcx, [rbp - 0x40]
mov dword [rsp + 0x28], edx
lea rdx, str._0.2X__0.2X__0.2X__0.2X__0.2X__0.2X
mov dword [rsp + 0x20], r10d
call fcn.140001fb0
lea rcx, [r13 - 6]
movsxd rax, esi
lea rdx, [rbp - 0x40]
cmp rax, rcx
je 0x1400017a9
lea rcx, str.__s__
call fcn.140001010
mov eax, 0x2aaaaaab
mov ebx, 1
imul r15d
mov eax, edx
shr eax, 0x1f
add edx, eax
lea ecx, [rdx + rdx*2]
add ecx, ecx
cmp r15d, ecx
jne 0x140001796
lea rcx, [0x140004338]
call fcn.140001010
jmp 0x140001796
inc ebx
inc esi
mov r8, rdi
movsxd rax, esi
cmp rax, r13
jb 0x140001700
jmp 0x1400017b5
lea rcx, str.__s_
call fcn.140001010
lea rcx, str._n__n_n
call fcn.140001010
mov edx, r12d
lea rcx, str.define_NumberOfElements__d_n_n_n
call fcn.140001010
mov r15d, 0x333
jmp 0x140001f22
mov rcx, r15
lea r8, str.ipv4
nop word [rax + rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x140001964
cmp rcx, 5
jne 0x1400017f0
mov eax, edi
and eax, 3
je 0x140001868
mov r14d, edi
sub r14d, eax
add r14d, ebx
mov r12d, r14d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, r14d
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x40], rax
mov r13, rax
test rax, rax
je 0x14000153b
mov r8d, r12d
mov edx, 0x90
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov r8, rdi
mov rdx, rsi
mov rcx, r13
call sub.VCRUNTIME140.dll_memcpy
mov rdi, qword [rsp + 0x40]
mov r13d, r14d
jmp 0x140001873
mov r13, rdi
mov qword [rsp + 0x40], rsi
mov rdi, rsi
mov r14, rsi
test r13, r13
je 0x14000153b
test r13b, 3
jne 0x14000153b
lea rcx, str.char_Ipv4Array______n_t
call fcn.140001010
mov esi, r15d
test r13, r13
je 0x14000193e
lea rdx, [rdi + 2]
lea rdi, [rdx + 1]
cmp ebx, 4
jne 0x14000191d
movzx ecx, byte [rdx]
inc r15d
movzx eax, byte [rdi]
movzx r9d, byte [rdx - 1]
movzx r8d, byte [rdx - 2]
lea rdx, str._d._d._d._d
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
lea rcx, [rbp - 0x60]
call fcn.140001fb0
lea rcx, [r13 - 4]
movsxd rax, esi
lea rdx, [rbp - 0x60]
cmp rax, rcx
je 0x140001932
lea rcx, str.__s__
call fcn.140001010
mov eax, r15d
mov ebx, 1
and eax, 0x80000007
jge 0x14000190b
dec eax
or eax, 0xfffffff8
inc eax
test eax, eax
jne 0x14000191f
lea rcx, [0x140004338]
call fcn.140001010
jmp 0x14000191f
inc ebx
inc esi
mov rdx, rdi
movsxd rax, esi
cmp rax, r13
jb 0x1400018a5
jmp 0x14000193e
lea rcx, str.__s_
call fcn.140001010
lea rcx, str._n__n_n
call fcn.140001010
mov edx, r15d
lea rcx, str.define_NumberOfElements__d_n_n_n
call fcn.140001010
mov r15d, 0x222
jmp 0x140001f22
mov rcx, r15
lea r8, str.ipv6
nop
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x1400019fd
cmp rcx, 5
jne 0x140001970
mov eax, edi
mov r14, rsi
and eax, 0xf
je 0x1400019e0
mov ebx, edi
sub ebx, eax
add ebx, 0x10
mov r14d, ebx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x40], rax
mov r13, rax
test rax, rax
je 0x14000153b
mov r8d, r14d
mov edx, 0x90
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov r8, rdi
mov rdx, rsi
mov rcx, r13
call sub.VCRUNTIME140.dll_memcpy
mov edi, ebx
mov r14, rsi
mov edx, edi
mov rcx, r13
call fcn.140002340
test eax, eax
je 0x14000153b
mov r15d, 0x111
jmp 0x140001f38
mov rcx, r15
lea r8, str.uuid
nop word [rax + rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x140001a9d
cmp rcx, 5
jne 0x140001a10
mov eax, edi
mov r14, rsi
and eax, 0xf
je 0x140001a80
mov ebx, edi
sub ebx, eax
add ebx, 0x10
mov r14d, ebx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8d, ebx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [rsp + 0x40], rax
mov r13, rax
test rax, rax
je 0x14000153b
mov r8d, r14d
mov edx, 0x90
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov r8, rdi
mov rdx, rsi
mov rcx, r13
call sub.VCRUNTIME140.dll_memcpy
mov edi, ebx
mov r14, rsi
mov edx, edi
mov rcx, r13
call fcn.140002010
test eax, eax
je 0x14000153b
mov r15d, 0x444
jmp 0x140001f38
mov rcx, r15
lea r8, [0x1400045f8]
nop word [rax + rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x140001d3d
cmp rcx, rbx
jne 0x140001ab0
xor ecx, ecx
call sub.api_ms_win_crt_time_l1_1_0.dll__time32
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
mov ebx, r15d
lea r14, [rbp - 0x60]
nop dword [rax]
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
movzx ecx, al
inc ebx
mov eax, 0x80808081
lea r14, [r14 + 1]
mul ecx
shr edx, 7
imul eax, edx, 0xff
sub ecx, eax
mov byte [r14 - 1], cl
cmp ebx, 0x20
jb 0x140001ae0
xor ecx, ecx
call sub.api_ms_win_crt_time_l1_1_0.dll__time32
movsx ecx, byte [rbp - 0x60]
xor ecx, eax
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
mov ebx, r15d
lea r14, [rbp - 0x80]
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
movzx ecx, al
inc ebx
mov eax, 0x80808081
lea r14, [r14 + 1]
mul ecx
shr edx, 7
imul eax, edx, 0xff
sub ecx, eax
mov byte [r14 - 1], cl
cmp ebx, 0x10
jb 0x140001b24
movups xmm0, xmmword [rbp - 0x60]
movups xmm1, xmmword [rbp - 0x50]
movups xmmword [rsp + 0x50], xmm0
movaps xmm0, xmmword [rbp - 0x80]
movdqa xmmword [rbp - 0x70], xmm0
movups xmmword [rsp + 0x60], xmm1
test rsi, rsi
je 0x14000153b
test edi, edi
je 0x14000153b
lea rax, [rbp - 0x60]
mov qword [rbp - 0x40], rsi
mov qword [rbp - 0x20], rax
lea rcx, [rbp - 0x40]
lea rax, [rbp - 0x80]
mov dword [rbp - 0x38], edi
mov qword [rbp - 0x18], rax
mov qword [rbp - 0x30], r15
mov dword [rbp - 0x28], r15d
call fcn.140001070
test eax, eax
je 0x14000153b
mov rax, qword [rbp - 0x30]
lea rdx, str.include__Windows.h__ninclude__stdio.h__ninclude__bcrypt.h__npragma_comment_lib___Bcrypt.lib___n_n_ndefine_NT_SUCCESS_status__t___________NTSTATUS__status_____0__ndefine_KEYSIZE_t_t32_ndefine_IVSIZE_t_t16_n_ntypedef_struct__AES__n_tPBYTE_tpPlainText__t_t___base_address_of_the_plain_text_data_n_tDWORD_tdwPlainSize__t_t___size_of_the_plain_text_data_n_n_tPBYTE_tpCipherText__t_t___base_address_of_the_encrypted_data_n_tDWORD_tdwCipherSize__t_t___size_of_it__this_can_change_from_dwPlainSize_in_case_there_was_padding__n_n_tPBYTE_tpKey__t_t_t___the_32_byte_key_n_tPBYTE_tpIv__t_t_t___the_16_byte_iv_nAES___PAES___n_n___the_real_decryption_implemantation_nBOOL_InstallAesDecryption_PAES_pAes___n_n_tBOOL_t_t_t_tbSTATE__TRUE__n_n_tBCRYPT_ALG_HANDLE_t_thAlgorithm__NULL__n_tBCRYPT_KEY_HANDLE_t_thKeyHandle__NULL__n_n_tULONG_t_t_t_tcbResult__NULL__n_tDWORD_t_t_t_tdwBlockSize__NULL__n_n_tDWORD_t_t_t_tcbKeyObject__NULL__n_tPBYTE_t_t_t_tpbKeyObject__NULL__n_n_tPBYTE_t_t_t_tpbPlainText__NULL__n_tDWORD_t_t_t_tcbPlainText__NULL__n_n_tNTSTATUS_t_t_tSTATUS_t_t_NULL__n_n_t___intializing__hAlgorithm__as_AES_algorithm_Handle_n_tSTATUS__BCryptOpenAlgorithmProvider_hAlgorithm__BCRYPT_AES_ALGORITHM__NULL__0___n_tif___NT_SUCCESS_STATUS____n_t_tprintf______BCryptOpenAlgorithmProvider_Failed_With_Error:_0x_0.8X__n___STATUS___n_t_tbSTATE__FALSE__goto__EndOfFunc__n_t_n_t___getting_the_size_of_the_key_object_variable_pbKeyObject_this_is_used_for_BCryptGenerateSymmetricKey_function_later_n_tSTATUS__BCryptGetProperty_hAlgorithm__BCRYPT_OBJECT_LENGTH___PBYTE_cbKeyObject__sizeof_DWORD___cbResult__0____n_tif___NT_SUCCESS_STATUS____n_t_tprintf______BCryptGetProperty_1__Failed_With_Error:_0x_0.8X__n___STATUS___n_t_tbSTATE__FALSE__goto__EndOfFunc___n_t_n_t___getting_the_size_of_the_block_used_in_the_encryption__since_this_is_aes_it_should_be_16__this_is_what_AES_does__n_tSTATUS__BCryptGetProperty_hAlgorithm__BCRYPT_BLOCK_LENGTH___PBYTE_dwBlockSize__sizeof_DWORD___cbResult__0____n_tif___NT_SUCCESS_STATUS____n_t_tprintf______BCryptGetProperty_2__Failed_With_Error:_0x_0.8X__n___STATUS____n_t_tbSTATE__FALSE__goto__EndOfFunc___n_t_n_t___checking_if_block_size_is_16_n_tif__dwBlockSize___16___n_t_tbSTATE__FALSE__goto__EndOfFunc___n_t_n_t___allocating_memory_for_the_key_object__n_tpbKeyObject___PBYTE_HeapAlloc_GetProcessHeap____0__cbKeyObject____n_tif__pbKeyObject__NULL___n_t_tbSTATE__FALSE__goto__EndOfFunc___n_t_n_t___setting_Block_Cipher_Mode_to_CBC__32_byte_key_and_16_byte_Iv__n_tSTATUS__BCryptSetProperty_hAlgorithm__BCRYPT_CHAINING_MODE___PBYTE_BCRYPT_CHAIN_MODE_CBC__sizeof_BCRYPT_CHAIN_MODE_CBC___0____n_tif___NT_SUCCESS_STATUS____n_t_tprintf______BCryptSetProperty_Failed_With_Error:_0x_0.8X__n___STATUS____n_t_tbSTATE__FALSE__goto__EndOfFunc___n_t_n_t___generating_the_key_object_from_the_aes_key__pAes__pKey___the_output_will_be_saved_in__pbKeyObject__of_size__cbKeyObject___n_tSTATUS__BCryptGenerateSymmetricKey_hAlgorithm__hKeyHandle__pbKeyObject__cbKeyObject___PBYTE_pAes__pKey__KEYSIZE__0____n_tif___NT_SUCCESS_STATUS____n_t_tprintf______BCryptGenerateSymmetricKey_Failed_With_Error:_0x_0.8X__n___STATUS____n_t_tbSTATE__FALSE__goto__EndOfFunc___n_t_n_t___running_BCryptDecrypt_first_time_with_NULL_output_parameters__thats_to_deduce_the_size_of_the_output_buffer___the_size_will_be_saved_in_cbPlainText__n_tSTATUS__BCryptDecrypt_hKeyHandle___PUCHAR_pAes__pCipherText___ULONG_pAes__dwCipherSize__NULL__pAes__pIv__IVSIZE__NULL__0__cbPlainText__BCRYPT_BLOCK_PADDING____n_tif___NT_SUCCESS_STATUS____n_t_tprintf______BCryptDecrypt_1__Failed_With_Error:_0x_0.8X__n___STATUS____n_t_tbSTATE__FALSE__goto__EndOfFunc___n_t_n_t___allocating_enough_memory__of_size_cbPlainText__n_tpbPlainText___PBYTE_HeapAlloc_GetProcessHeap____0__cbPlainText____n_tif__pbPlainText__NULL___n_t_tbSTATE__FALSE__goto__EndOfFunc___n_t_n_t___running_BCryptDecrypt_second_time_with__pbPlainText__as_output_buffer_n_tSTATUS__BCryptDecrypt_hKeyHandle___PUCHAR_pAes__pCipherText___ULONG_pAes__dwCipherSize__NULL__pAes__pIv__IVSIZE__pbPlainText__cbPl
lea rcx, [0x140004c38]
mov qword [rsp + 0x48], rax
call fcn.140001010
mov r13d, dword [rbp - 0x28]
lea rdx, str.AesCipherText
lea rcx, str.unsigned_char__s____
call fcn.140001010
lea r12, str.0x_0.2X
mov ebx, r15d
test r13, r13
je 0x140001c59
mov rax, qword [rsp + 0x48]
lea r12, [r13 - 1]
mov r14, r15
mov rdi, rax
lea r15, str.0x_0.2X
mov qword [rsp + 0x48], rax
mov eax, ebx
and eax, 0x8000000f
jge 0x140001c17
dec eax
or eax, 0xfffffff0
inc eax
test eax, eax
jne 0x140001c27
lea rcx, [0x140004338]
call fcn.140001010
movzx edx, byte [rdi]
lea rcx, str.0x_0.2X_
cmp r14, r12
cmovae rcx, r15
call fcn.140001010
mov rax, qword [rsp + 0x48]
inc ebx
movsxd r14, ebx
inc rdi
cmp r14, r13
jb 0x140001c02
xor r15d, r15d
lea r12, str.0x_0.2X
lea rcx, str.__n_n_n
call fcn.140001010
lea rdx, str.AesKey
lea rcx, str.unsigned_char__s____
call fcn.140001010
mov r13, qword [rsp + 0x48]
lea rdi, [rsp + 0x50]
mov ebx, r15d
mov eax, ebx
and eax, 0x8000000f
jge 0x140001c95
dec eax
or eax, 0xfffffff0
inc eax
test eax, eax
jne 0x140001ca5
lea rcx, [0x140004338]
call fcn.140001010
movzx edx, byte [rdi]
lea rcx, str.0x_0.2X_
cmp ebx, 0x1f
cmovae rcx, r12
call fcn.140001010
inc ebx
inc rdi
cmp ebx, 0x20
jb 0x140001c85
lea rcx, str.__n_n_n
call fcn.140001010
lea rdx, str.AesIv
lea rcx, str.unsigned_char__s____
call fcn.140001010
mov ebx, r15d
lea rdi, [rbp - 0x70]
nop dword [rax + rax]
mov eax, ebx
mov r14, rsi
and eax, 0x8000000f
jge 0x140001d03
dec eax
or eax, 0xfffffff0
inc eax
test eax, eax
jne 0x140001d13
lea rcx, [0x140004338]
call fcn.140001010
movzx edx, byte [rdi]
lea rcx, str.0x_0.2X_
cmp ebx, 0xf
cmovae rcx, r12
call fcn.140001010
inc ebx
inc rdi
cmp ebx, 0x10
jb 0x140001cf0
mov qword [rsp + 0x48], r13
jmp 0x140001f16
mov rcx, r15
lea r8, [0x1400045fc]
nop word [rax + rax]
movzx eax, byte [rdx + rcx]
inc rcx
cmp al, byte [r8 + rcx - 1]
jne 0x140001f29
cmp rcx, rbx
jne 0x140001d50
xor ecx, ecx
call sub.api_ms_win_crt_time_l1_1_0.dll__time32
mov ecx, eax
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
mov ebx, r15d
lea r14, [rbp - 0x70]
nop dword [rax]
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
movzx ecx, al
inc ebx
mov eax, 0x80808081
lea r14, [r14 + 1]
mul ecx
shr edx, 7
imul eax, edx, 0xff
sub ecx, eax
mov byte [r14 - 1], cl
cmp ebx, 0x10
jb 0x140001d80
movaps xmm0, xmmword [rbp - 0x70]
lea rax, [rbp - 0x70]
lea rcx, str.Advapi32
movdqa xmmword [rbp - 0x60], xmm0
mov qword [rsp + 0x58], rax
mov dword [rsp + 0x50], 0x10
mov dword [rsp + 0x54], 0x10
mov dword [rbp - 0x80], edi
mov dword [rbp - 0x7c], edi
mov qword [rbp - 0x78], rsi
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.SystemFunction032
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rdx, [rsp + 0x50]
lea rcx, [rbp - 0x80]
call rax
test eax, eax
jns 0x140001e15
mov edx, eax
lea rcx, str.____SystemFunction032_FAILED_With_Error:_0x_0.8X__n
call fcn.140001010
jmp 0x14000153b
lea rdx, str.include__Windows.h__ninclude__stdio.h__n_n_n___this_is_what_SystemFunction032_function_take_as_a_parameter_ntypedef_struct_n_nDWORD_tLength___nDWORD_tMaximumLength___nPVOID_tBuffer___n_n_USTRING___n_n___defining_how_does_the_function_look___more_on_this_structure_in_the_api_hashing_part_ntypedef_NTSTATUS_NTAPI_fnSystemFunction032___n_tstruct_USTRING_Img___n_tstruct_USTRING_Key_n____n_nBOOL_Rc4EncryptionViSystemFunc032_IN_PBYTE_pRc4Key__IN_PBYTE_pPayloadData__IN_DWORD_dwRc4KeySize__IN_DWORD_sPayloadSize___n_t_n_t___the_return_of_SystemFunction032_n_tNTSTATUS_tSTATUS__NULL___n_t_n_t___making_2_USTRING_variables__1_passed_as_key_and_one_passed_as_the_block_of_data_to_encrypt_decrypt_n_tUSTRING_t_tKey___.Buffer__pRc4Key___t_t.Length__dwRc4KeySize__t_t.MaximumLength__dwRc4KeySize____n_t_t_tImg___.Buffer__pPayloadData___t.Length__sPayloadSize__t_t.MaximumLength__sPayloadSize____n_t_n_t_n_t___since_SystemFunction032_is_exported_from_Advapi32.dll__we_load_it_Advapi32_into_the_prcess__n_t___and_using_its_return_as_the_hModule_parameter_in_GetProcAddress_n_tfnSystemFunction032_SystemFunction032___fnSystemFunction032_GetProcAddress_LoadLibraryA__Advapi32_____SystemFunction032_____n_t_n_t___if_SystemFunction032_calls_failed_it_will_return_non_zero_value_n_tif___STATUS__SystemFunction032_Img__Key_____0x0___n_t_tprintf______SystemFunction032_FAILED_With_Error_:_0x_0.8X_n___STATUS____n_t_treturn_FALSE___n_t_n_n_treturn_TRUE___n_n
lea rcx, [0x140004c38]
call fcn.140001010
lea rdx, str.Rc4CipherText
mov r13, rdi
lea rcx, str.unsigned_char__s____
call fcn.140001010
lea r12, str.0x_0.2X
mov ebx, r15d
test edi, edi
je 0x140001ead
lea r12, [rdi - 1]
mov r14, r15
mov rdi, rsi
lea r15, str.0x_0.2X
nop dword [rax]
mov eax, ebx
and eax, 0x8000000f
jge 0x140001e70
dec eax
or eax, 0xfffffff0
inc eax
test eax, eax
jne 0x140001e80
lea rcx, [0x140004338]
call fcn.140001010
movzx edx, byte [rdi]
lea rcx, str.0x_0.2X_
cmp r14, r12
cmovae rcx, r15
call fcn.140001010
inc ebx
inc rdi
movsxd r14, ebx
cmp r14, r13
jb 0x140001e60
xor r15d, r15d
lea r12, str.0x_0.2X
lea rcx, str.__n_n_n
call fcn.140001010
lea rdx, str.Rc4Key
lea rcx, str.unsigned_char__s____
call fcn.140001010
mov ebx, r15d
lea rdi, [rbp - 0x60]
mov eax, ebx
mov r14, rsi
and eax, 0x8000000f
jge 0x140001ee6
dec eax
or eax, 0xfffffff0
inc eax
test eax, eax
jne 0x140001ef6
lea rcx, [0x140004338]
call fcn.140001010
movzx edx, byte [rdi]
lea rcx, str.0x_0.2X_
cmp ebx, 0xf
cmovae rcx, r12
call fcn.140001010
inc ebx
inc rdi
cmp ebx, 0x10
jb 0x140001ed3
lea rcx, str.__n_n_n
call fcn.140001010
test r14, r14
je 0x140001f4c
jmp 0x140001f38
lea rcx, [0x140004a40]
call fcn.140001010
mov r14, rsi
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, r14
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, qword [rsp + 0x48]
test rbx, rbx
je 0x140001f6a
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov rbx, qword [rsp + 0x40]
test rbx, rbx
je 0x140001f8d
cmp rbx, r14
je 0x140001f8d
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
test r15d, r15d
je 0x140001f9a
mov ecx, r15d
call fcn.140002670
xor eax, eax
jmp 0x140001540