Function at 0x18005001c
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r13
push rbp
push r14
push r15
lea rbp, [rax - 0x48]
sub rsp, reloc.WLDAP32.dll_Ordinal_304
mov bl, r9b
xor r15d, r15d
mov rsi, rcx
lea eax, [rbx + 6]
lea r14d, [r15 + 1]
mov rdi, r8
mov byte [rsp + 0x36], al
lea eax, [r14 + rbx]
mov byte [rsp + 0x3b], dl
lea rcx, [rsp + 0x3c]
xor edx, edx
mov r8d, 0xf4
mov byte [rsp + 0x3a], al
mov dword [rsp + 0x30], r14d
mov word [rsp + 0x34], r15w
mov word [rsp + 0x37], 0xaa00
mov byte [rsp + 0x39], r15b
call fcn.1800cadf0
mov r13d, 0xf2
cmp bl, r13b
ja 0x180050490
test bl, bl
je 0x1800500af
lea rcx, [rsp + 0x3c]
movzx r8d, bl
mov rdx, rdi
call fcn.1800ca790
movzx edi, bl
xor dl, dl
xor cl, cl
lea r8d, [rdi + 2]
test r8d, r8d
jle 0x1800500d1
movzx eax, cl
add cl, r14b
xor dl, byte [rsp + rax + 0x3a]
movzx eax, cl
cmp eax, r8d
jl 0x1800500bf
movzx eax, bl
lea rcx, [0x18012f148]
mov byte [rsp + rax + 0x3c], dl
mov byte [rsp + rax + 0x3d], 0xbb
call fcn.18004d68c
lea edx, [rdi + 0xe]
lea rcx, [rsp + 0x30]
mov r8d, r14d
call fcn.180053168
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.18004d68c
mov ebx, 0xa
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_Sleep]
mov edi, 0x100
lea rdx, [rsp + 0x30]
mov r8d, edi
mov rcx, rsi
call sub.HID.DLL_HidD_SetFeature
test al, al
je 0x18005047f
mov ecx, ebx
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rsp + 0x30]
mov r8d, edi
mov rcx, rsi
call sub.HID.DLL_HidD_GetFeature
test al, al
je 0x18005046e
mov al, byte [rsp + 0x30]
cmp al, 3
jne 0x180050462
movzx ebx, word [rsp + 0x36]
lea eax, [rbx - 6]
cmp ax, r13w
ja 0x180050456
lea rcx, [0x18012f150]
call fcn.18004d68c
movzx edx, bx
lea rcx, [rsp + 0x30]
add edx, 8
mov r8d, r14d
call fcn.180053168
lea rcx, reloc.Cabinet.dll_FCICreate
call fcn.18004d68c
mov al, byte [rsp + 0x38]
sub bl, 6
cmp al, 0xaa
jne 0x18005044a
movzx r8d, byte [rsp + 0x3a]
movzx edx, bl
dec r8d
cmp r8d, edx
jne 0x18005043c
lea r9d, [rdx + 2]
xor cl, cl
xor r8b, r8b
test r9d, r9d
jle 0x1800501de
movzx eax, r8b
add r8b, r14b
xor cl, byte [rsp + rax + 0x3a]
movzx eax, r8b
cmp eax, r9d
jl 0x1800501ca
movzx esi, bl
cmp cl, byte [rsp + rsi + 0x3c]
jne 0x18005042a
mov byte [rsp + rsi + 0x3d], 0xbb
movzx r9d, byte [rsp + 0x3b]
mov ecx, r9d
test r9d, r9d
je 0x1800503cf
dec ecx
je 0x18005027d
dec ecx
je 0x180050262
dec ecx
je 0x180050259
dec ecx
je 0x180050250
dec ecx
je 0x180050247
sub ecx, 2
je 0x18005023e
sub ecx, 3
je 0x180050235
cmp ecx, 0xf5
je 0x1800503cf
lea r8, str.unknow_error_code_
jmp 0x180050269
lea r8, str.parameter_value_out_of_range
jmp 0x180050269
lea r8, str.receive
jmp 0x180050269
lea r8, str.check_sequence
jmp 0x180050269
lea r8, str.timeout_reply
jmp 0x180050269
lea r8, str.not_COM_port_selected
jmp 0x180050269
lea r8, str.checksum
mov edx, r9d
lea rcx, str.ERROR_rdm_send_receive___Status_failure:_0x_02x____s_n
call fcn.18004d68c
jmp 0x18005049f
cmp bl, r14b
jne 0x1800503c3
movzx edx, byte [rsp + 0x3c]
mov eax, reloc.WLDAP32.dll_Ordinal_140
cmp edx, eax
jg 0x180050344
je 0x18005033b
mov ecx, edx
sub ecx, 0x80
je 0x180050332
dec ecx
je 0x180050326
dec ecx
je 0x18005031a
dec ecx
je 0x18005030e
dec ecx
je 0x180050302
dec ecx
je 0x1800502f6
sub ecx, 2
je 0x1800502ea
sub ecx, 3
je 0x1800502de
dec ecx
jne 0x180050373
lea r8, str.wrong_SNR_during_anticollision
jmp 0x1800503b7
lea r8, str.initVal_process
jmp 0x1800503b7
lea r8, str.unknown_internal_error
jmp 0x1800503b7
lea r8, str.format_or_parameter_of_the_command
jmp 0x1800503b7
lea r8, str.data_response_from_the_card
jmp 0x1800503b7
lea r8, str.card_does_not_exist
jmp 0x1800503b7
lea r8, str.reader_reply_timeout
jmp 0x1800503b7
lea r8, str.set_failure
jmp 0x1800503b7
lea r8, str.set_OK
jmp 0x1800503b7
lea r8, str.authentication_failure
jmp 0x1800503b7
mov ecx, edx
sub ecx, 0x8f
je 0x1800503b0
dec ecx
je 0x1800503a7
dec ecx
je 0x18005039e
dec ecx
je 0x180050395
dec ecx
je 0x18005038c
dec ecx
je 0x180050383
dec ecx
je 0x18005037a
dec ecx
jne 0x180050373
lea r8, str.operation_did_not_succeed
jmp 0x1800503b7
mov r8, qword [rsp + 0x20]
jmp 0x1800503b7
lea r8, str.lock_operation_did_not_succeed
jmp 0x1800503b7
lea r8, str.object_has_been_locked
jmp 0x1800503b7
lea r8, str.block_does_not_exist
jmp 0x1800503b7
lea r8, str.does_not_support_option_mode
jmp 0x1800503b7
lea r8, str.format_of_the_command
jmp 0x1800503b7
lea r8, str.card_does_not_support_this_command
jmp 0x1800503b7
lea r8, str.reader_received_unknown_command
lea rcx, str.ERROR_rdm_send_receive___Command_failure:_0x_02x____s_n
jmp 0x180050273
lea rcx, str.ERROR_rdm_send_receive___data_size_is_not_1_when_dealing_when_an_error_status___hhu__n
jmp 0x18005049a
mov r15d, r14d
mov r14, qword [rbp + 0x70]
test r14, r14
je 0x18005049f
mov rdi, qword [rbp + 0x78]
test rdi, rdi
je 0x18005049f
and qword [r14], 0
mov byte [rdi], 0
test bl, bl
je 0x18005049f
mov rdx, rsi
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov qword [r14], rax
test rax, rax
je 0x180050425
lea rdx, [rsp + 0x3c]
mov r8, rsi
mov rcx, rax
call fcn.1800ca790
mov byte [rdi], bl
jmp 0x18005049f
xor r15d, r15d
jmp 0x18005049f
movzx r8d, byte [rsp + rsi + 0x3c]
movzx edx, cl
lea rcx, str.ERROR_rdm_send_receive___Bad_CRC__0x_02x____0x_02x__n
jmp 0x180050443
lea rcx, str.ERROR_rdm_send_receive___Bad_HID_size_vs_Data_size__0x_02x____0x_02x__n
call fcn.18004d68c
jmp 0x18005049f
movzx edx, al
lea rcx, str.ERROR_rdm_send_receive___Bad_China_header__0x_02x__n
jmp 0x18005049a
movzx edx, bx
lea rcx, str.ERROR_rdm_send_receive___Bad_HID_size___hhu__n
jmp 0x18005049a
movzx edx, al
lea rcx, str.ERROR_rdm_send_receive___Bad_HID_header__0x_02x__n
jmp 0x18005049a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_rdm_send_receive___HidD_GetFeature__0x_08x__n
mov edx, eax
jmp 0x18005049a
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ERROR_rdm_send_receive___HidD_SetFeature__0x_08x__n
mov edx, eax
jmp 0x18005049a
movzx edx, bl
lea rcx, str.ERROR_rdm_send_receive___Size___242___hhu__n
call fcn.18004d68c
lea r11, [rsp + reloc.WLDAP32.dll_Ordinal_304]
mov eax, r15d
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r13, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret