Function at 0x405592
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.00478810
add esp, 0xc
mov dl, bl
mov cl, bl
movzx eax, cl
xor dl, byte [esp + eax + 0x1e]
inc cl
cmp cl, 2
jb 0x4055dc
push 0x4af9d8
mov byte [esp + 0x24], dl
mov byte [esp + 0x25], 0xbb
call fcn.00403fb4
xor ebp, ebp
lea ecx, [esp + 0x18]
inc ebp
push ebp
push 0xe
pop edx
call fcn.0040860a
push 0x49f578
call fcn.00403fb4
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 0x4058f0
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 0x4058e2
mov al, byte [esp + 0x14]
cmp al, 3
jne 0x4058d7
movzx ebx, word [esp + 0x1a]
push 6
mov eax, ebx
pop ecx
cmp ax, cx
jb 0x4058cf
mov ecx, 0xf8
cmp ax, cx
ja 0x4058cf
push 0x4af9e0
call fcn.00403fb4
push ebp
lea edx, [ebx + 8]
lea ecx, [esp + 0x1c]
call fcn.0040860a
push 0x49f578
call fcn.00403fb4
mov al, byte [esp + 0x28]
add esp, 0xc
sub bl, 6
cmp al, 0xaa
jne 0x4058c4
movzx eax, byte [esp + 0x1e]
dec eax
movzx esi, bl
cmp eax, esi
jne 0x4058b8
lea edi, [esi + 2]
xor cl, cl
xor al, al
test edi, edi
je 0x4056e2
xor edx, edx
xor cl, byte [esp + edx + 0x1e]
inc al
movzx edx, al
cmp edx, edi
jb 0x4056d5
mov al, byte [esp + esi + 0x20]
cmp cl, al
jne 0x4058a6
mov byte [esp + esi + 0x21], 0xbb
movzx ecx, byte [esp + 0x1f]
cmp ecx, 4
ja 0x405805
je 0x4057fb
mov eax, ecx
sub eax, 0
je 0x405829
sub eax, 1
je 0x405739
sub eax, 1
je 0x40572f
sub eax, 1
jne 0x405822
mov eax, str.not_COM_port_selected
jmp 0x40589a
mov eax, str.checksum
jmp 0x40589a
cmp bl, 1
jne 0x4057f0
movzx ecx, byte [esp + 0x20]
lea eax, [ecx - 0x80]
cmp eax, 0x16
ja case.0x405753.134
jmp dword [eax*4 + 0x405912]
mov eax, str.set_OK
jmp 0x4057dc
mov eax, str.set_failure
jmp 0x4057dc
mov eax, str.reader_reply_timeout
jmp 0x4057dc
mov eax, str.card_does_not_exist
jmp 0x4057dc
mov eax, str.data_response_from_the_card
jmp 0x4057dc
mov eax, str.format_or_parameter_of_the_command
jmp 0x4057dc
mov eax, str.unknown_internal_error
jmp 0x4057dc
mov eax, str.initVal_process
jmp 0x4057dc
mov eax, str.wrong_SNR_during_anticollision
jmp 0x4057dc
mov eax, str.authentication_failure
jmp 0x4057dc
mov eax, str.reader_received_unknown_command
jmp 0x4057dc
mov eax, str.card_does_not_support_this_command
jmp 0x4057dc
mov eax, str.format_of_the_command
jmp 0x4057dc
mov eax, str.does_not_support_option_mode
jmp 0x4057dc
mov eax, str.block_does_not_exist
jmp 0x4057dc
mov eax, str.object_has_been_locked
jmp 0x4057dc
mov eax, str.lock_operation_did_not_succeed
jmp 0x4057dc
mov eax, str.operation_did_not_succeed
jmp 0x4057dc
mov eax, dword [esp + 0x10]
push eax
push ecx
push str.ERROR_rdm_send_receive___Command_failure:_0x_02x____s_n
call fcn.00403fb4
add esp, 0xc
jmp 0x405903
push esi
push str.ERROR_rdm_send_receive___data_size_is_not_1_when_dealing_when_an_error_status___hhu__n
jmp 0x4058fc
mov eax, str.timeout_reply
jmp 0x40589a
mov eax, ecx
sub eax, 5
je 0x405895
dec eax
sub eax, 1
je 0x40588e
sub eax, 3
je 0x405887
sub eax, 0xf5
je 0x405829
mov eax, str.unknow_error_code_
jmp 0x40589a
mov dword [esp + 0x10], ebp
mov ebp, dword [esp + 0x120]
test ebp, ebp
je 0x405903
mov edi, dword [esp + 0x124]
test edi, edi
je 0x405903
and dword [ebp], 0
mov byte [edi], 0
test bl, bl
je 0x405903
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp], eax
test eax, eax
je 0x405880
push esi
lea ecx, [esp + 0x24]
push ecx
push eax
call fcn.004793b0
add esp, 0xc
mov byte [edi], bl
jmp 0x405903
xor eax, eax
jmp 0x405907
mov eax, str.parameter_value_out_of_range
jmp 0x40589a
mov eax, str.receive
jmp 0x40589a
mov eax, str.check_sequence
push eax
push ecx
push str.ERROR_rdm_send_receive___Status_failure:_0x_02x____s_n
jmp 0x4057e3
movzx eax, al
push eax
movzx eax, cl
push eax
push str.ERROR_rdm_send_receive___Bad_CRC__0x_02x____0x_02x__n
jmp 0x4057e3
push eax
push esi
push str.ERROR_rdm_send_receive___Bad_HID_size_vs_Data_size__0x_02x____0x_02x__n
jmp 0x4057e3
movzx eax, al
push eax
push str.ERROR_rdm_send_receive___Bad_China_header__0x_02x__n
jmp 0x4058fc
push eax
push str.ERROR_rdm_send_receive___Bad_HID_size___hhu__n
jmp 0x4058fc
movzx eax, al
push eax
push str.ERROR_rdm_send_receive___Bad_HID_header__0x_02x__n
jmp 0x4058fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_rdm_send_receive___HidD_GetFeature__0x_08x__n
jmp 0x4058fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_rdm_send_receive___HidD_SetFeature__0x_08x__n
call fcn.00403fb4
pop ecx
pop ecx
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret