Function at 0x40b364
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x104
push ebx
push ebp
push esi
push edi
push 6
pop eax
xor ebx, ebx
mov byte [esp + 0x1a], al
push 0xf4
lea eax, [esp + 0x24]
mov dword [esp + 0x14], ebx
push ebx
push eax
mov esi, ecx
mov dword [esp + 0x20], 1
mov word [esp + 0x24], bx
mov dword [esp + 0x27], 0x100aa00
mov byte [esp + 0x2b], 0x86
call fcn.0049ee30
add esp, 0xc
mov dl, bl
mov cl, bl
movzx eax, cl
xor dl, byte [esp + eax + 0x1e]
inc cl
cmp cl, 2
jb 0x40b3ae
push 0x4de190
mov byte [esp + 0x24], dl
mov byte [esp + 0x25], 0xbb
call fcn.00409cda
xor ebp, ebp
lea ecx, [esp + 0x18]
inc ebp
push ebp
push 0xe
pop edx
call fcn.0040f762
push 0x4c75d0
call fcn.00409cda
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 0xc
push 0xa
call edi
mov ebx, 0x100
lea eax, [esp + 0x14]
push ebx
push eax
push esi
call dword [sym.imp.HID.DLL_HidD_SetFeature]
test al, al
je 0x40b6c2
push 0xa
call edi
push ebx
lea eax, [esp + 0x18]
push eax
push esi
call dword [sym.imp.HID.DLL_HidD_GetFeature]
test al, al
je 0x40b6b4
mov al, byte [esp + 0x14]
cmp al, 3
jne 0x40b6a9
movzx ebx, word [esp + 0x1a]
push 6
mov eax, ebx
pop ecx
cmp ax, cx
jb 0x40b6a1
mov ecx, 0xf8
cmp ax, cx
ja 0x40b6a1
push 0x4de198
call fcn.00409cda
push ebp
lea edx, [ebx + 8]
lea ecx, [esp + 0x1c]
call fcn.0040f762
push 0x4c75d0
call fcn.00409cda
mov al, byte [esp + 0x28]
add esp, 0xc
sub bl, 6
cmp al, 0xaa
jne 0x40b696
movzx eax, byte [esp + 0x1e]
dec eax
movzx esi, bl
cmp eax, esi
jne 0x40b68a
lea edi, [esi + 2]
xor cl, cl
xor al, al
test edi, edi
je 0x40b4b4
xor edx, edx
xor cl, byte [esp + edx + 0x1e]
inc al
movzx edx, al
cmp edx, edi
jb 0x40b4a7
mov al, byte [esp + esi + 0x20]
cmp cl, al
jne 0x40b678
mov byte [esp + esi + 0x21], 0xbb
movzx ecx, byte [esp + 0x1f]
cmp ecx, 4
ja 0x40b5d7
je 0x40b5cd
mov eax, ecx
sub eax, 0
je 0x40b5fb
sub eax, 1
je 0x40b50b
sub eax, 1
je 0x40b501
sub eax, 1
jne 0x40b5f4
mov eax, str.not_COM_port_selected
jmp 0x40b66c
mov eax, str.checksum
jmp 0x40b66c
cmp bl, 1
jne 0x40b5c2
movzx ecx, byte [esp + 0x20]
lea eax, [ecx - 0x80]
cmp eax, 0x16
ja case.0x40b525.134
jmp dword [eax*4 + 0x40b6e4]
mov eax, str.set_OK
jmp 0x40b5ae
mov eax, str.set_failure
jmp 0x40b5ae
mov eax, str.reader_reply_timeout
jmp 0x40b5ae
mov eax, str.card_does_not_exist
jmp 0x40b5ae
mov eax, str.data_response_from_the_card
jmp 0x40b5ae
mov eax, str.format_or_parameter_of_the_command
jmp 0x40b5ae
mov eax, str.unknown_internal_error
jmp 0x40b5ae
mov eax, str.initVal_process
jmp 0x40b5ae
mov eax, str.wrong_SNR_during_anticollision
jmp 0x40b5ae
mov eax, str.authentication_failure
jmp 0x40b5ae
mov eax, str.reader_received_unknown_command
jmp 0x40b5ae
mov eax, str.card_does_not_support_this_command
jmp 0x40b5ae
mov eax, str.format_of_the_command
jmp 0x40b5ae
mov eax, str.does_not_support_option_mode
jmp 0x40b5ae
mov eax, str.block_does_not_exist
jmp 0x40b5ae
mov eax, str.object_has_been_locked
jmp 0x40b5ae
mov eax, str.lock_operation_did_not_succeed
jmp 0x40b5ae
mov eax, str.operation_did_not_succeed
jmp 0x40b5ae
mov eax, dword [esp + 0x10]
push eax
push ecx
push str.ERROR_rdm_send_receive___Command_failure:_0x_02x____s_n
call fcn.00409cda
add esp, 0xc
jmp 0x40b6d5
push esi
push str.ERROR_rdm_send_receive___data_size_is_not_1_when_dealing_when_an_error_status___hhu__n
jmp 0x40b6ce
mov eax, str.timeout_reply
jmp 0x40b66c
mov eax, ecx
sub eax, 5
je 0x40b667
dec eax
sub eax, 1
je 0x40b660
sub eax, 3
je 0x40b659
sub eax, 0xf5
je 0x40b5fb
mov eax, str.unknow_error_code_
jmp 0x40b66c
mov dword [esp + 0x10], ebp
mov ebp, dword [esp + 0x120]
test ebp, ebp
je 0x40b6d5
mov edi, dword [esp + 0x124]
test edi, edi
je 0x40b6d5
and dword [ebp], 0
mov byte [edi], 0
test bl, bl
je 0x40b6d5
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp], eax
test eax, eax
je 0x40b652
push esi
lea ecx, [esp + 0x24]
push ecx
push eax
call fcn.0049fa90
add esp, 0xc
mov byte [edi], bl
jmp 0x40b6d5
xor eax, eax
jmp 0x40b6d9
mov eax, str.parameter_value_out_of_range
jmp 0x40b66c
mov eax, str.receive
jmp 0x40b66c
mov eax, str.check_sequence
push eax
push ecx
push str.ERROR_rdm_send_receive___Status_failure:_0x_02x____s_n
jmp 0x40b5b5
movzx eax, al
push eax
movzx eax, cl
push eax
push str.ERROR_rdm_send_receive___Bad_CRC__0x_02x____0x_02x__n
jmp 0x40b5b5
push eax
push esi
push str.ERROR_rdm_send_receive___Bad_HID_size_vs_Data_size__0x_02x____0x_02x__n
jmp 0x40b5b5
movzx eax, al
push eax
push str.ERROR_rdm_send_receive___Bad_China_header__0x_02x__n
jmp 0x40b6ce
push eax
push str.ERROR_rdm_send_receive___Bad_HID_size___hhu__n
jmp 0x40b6ce
movzx eax, al
push eax
push str.ERROR_rdm_send_receive___Bad_HID_header__0x_02x__n
jmp 0x40b6ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_rdm_send_receive___HidD_GetFeature__0x_08x__n
jmp 0x40b6ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_rdm_send_receive___HidD_SetFeature__0x_08x__n
call fcn.00409cda
pop ecx
pop ecx
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret