Function at 0x40ad82
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
and dword [ebp - 8], 0
push 0xf4
lea eax, [ebp - 0xfc]
push 0
push eax
mov byte [ebp - 0x108], 1
mov byte [ebp - 0x107], 0
mov byte [ebp - 0x106], 0
mov byte [ebp - 0x105], 0
mov byte [ebp - 0x104], 0
mov byte [ebp - 0x103], 0
mov byte [ebp - 0x102], 6
mov byte [ebp - 0x101], 0
mov byte [ebp - 0x100], 0xaa
mov byte [ebp - 0xff], 0
mov byte [ebp - 0xfe], 1
mov byte [ebp - 0xfd], 0x86
call fcn.00497bc6
add esp, 0xc
xor dl, dl
xor al, al
xor ecx, ecx
xor al, byte [ebp + ecx - 0xfe]
inc dl
movzx ecx, dl
cmp ecx, 2
jl 0x40adff
push ebx
push esi
push edi
push 0x4b56f0
mov byte [ebp - 0xfc], al
mov byte [ebp - 0xfb], 0xbb
call fcn.00409709
lea eax, [ebp - 0x108]
push 0xe
push eax
xor eax, eax
inc eax
call fcn.0040efba
mov esi, 0x49ed98
push esi
call fcn.00409709
mov ebx, dword [0x49e33c]
add esp, 0x10
push 0xa
call ebx
mov edi, 0x100
push edi
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 8]
call fcn.00496d28
test al, al
je 0x40b137
push 0xa
call ebx
push edi
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 8]
call fcn.00496d22
test al, al
je 0x40b129
cmp byte [ebp - 0x108], 3
jne 0x40b11a
mov ax, word [ebp - 0x102]
movzx ebx, ax
cmp ax, 6
jb 0x40b10f
lea ecx, [edi - 8]
cmp ax, cx
ja 0x40b10f
push 0x4b56f8
call fcn.00409709
movzx eax, bx
add eax, 8
push eax
lea eax, [ebp - 0x108]
xor edi, edi
push eax
inc edi
mov eax, edi
call fcn.0040efba
push esi
call fcn.00409709
sub bl, 6
add esp, 0x10
cmp byte [ebp - 0x100], 0xaa
mov byte [ebp - 4], bl
jne 0x40b100
movzx eax, byte [ebp - 0xfe]
movzx esi, bl
dec eax
cmp eax, esi
jne 0x40b0ef
lea edx, [esi + 2]
xor bl, bl
xor al, al
test edx, edx
jle 0x40af27
xor ecx, ecx
xor al, byte [ebp + ecx - 0xfe]
inc bl
movzx ecx, bl
cmp ecx, edx
jl 0x40af17
mov cl, byte [ebp + esi - 0xfc]
cmp al, cl
jne 0x40b0e0
mov byte [ebp + esi - 0xfb], 0xbb
movzx ecx, byte [ebp - 0xfd]
cmp ecx, 4
jg 0x40b046
je 0x40b03c
mov eax, ecx
sub eax, 0
je 0x40b068
dec eax
je 0x40af80
dec eax
je 0x40af76
dec eax
jne 0x40b061
mov eax, str.not_COM_port_selected
jmp 0x40b0d7
mov eax, str.checksum
jmp 0x40b0d7
cmp byte [ebp - 4], 1
jne 0x40b031
movzx ecx, byte [ebp - 0xfc]
lea eax, [ecx - 0x80]
cmp eax, 0x16
ja case.0x40af9d.134
jmp dword [eax*4 + 0x40b152]
mov eax, str.set_OK
jmp 0x40b025
mov eax, str.set_failure
jmp 0x40b025
mov eax, str.reader_reply_timeout
jmp 0x40b025
mov eax, str.card_does_not_exist
jmp 0x40b025
mov eax, str.data_response_from_the_card
jmp 0x40b025
mov eax, str.format_or_parameter_of_the_command
jmp 0x40b025
mov eax, str.unknown_internal_error
jmp 0x40b025
mov eax, str.initVal_process
jmp 0x40b025
mov eax, str.wrong_SNR_during_anticollision
jmp 0x40b025
mov eax, str.authentication_failure
jmp 0x40b025
mov eax, str.reader_received_unknown_command
jmp 0x40b025
mov eax, str.card_does_not_support_this_command
jmp 0x40b025
mov eax, str.format_of_the_command
jmp 0x40b025
mov eax, str.does_not_support_option_mode
jmp 0x40b025
mov eax, str.block_does_not_exist
jmp 0x40b025
mov eax, str.object_has_been_locked
jmp 0x40b025
mov eax, str.lock_operation_did_not_succeed
jmp 0x40b025
mov eax, str.operation_did_not_succeed
jmp 0x40b025
mov eax, dword [ebp - 8]
push eax
push ecx
push str.ERROR_rdm_send_receive___Command_failure:_0x_02x____s_n
jmp 0x40b0f6
push esi
push str.ERROR_rdm_send_receive___data_size_is_not_1_when_dealing_when_an_error_status___hhu__n
jmp 0x40b143
mov eax, str.timeout_reply
jmp 0x40b0d7
mov eax, ecx
sub eax, 5
je 0x40b0d2
dec eax
dec eax
je 0x40b0cb
sub eax, 3
je 0x40b0c4
sub eax, 0xf5
je 0x40b068
mov eax, str.unknow_error_code_
jmp 0x40b0d7
mov dword [ebp - 8], edi
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x40b14a
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x40b14a
and dword [edi], 0
cmp byte [ebp - 4], 0
mov byte [ebx], 0
je 0x40b14a
push esi
push 0x40
call dword [0x49e32c]
mov dword [edi], eax
test eax, eax
je 0x40b0bb
push esi
lea ecx, [ebp - 0xfc]
push ecx
push eax
call fcn.00497bcc
mov al, byte [ebp - 4]
add esp, 0xc
mov byte [ebx], al
jmp 0x40b14a
and dword [ebp - 8], 0
jmp 0x40b14a
mov eax, str.parameter_value_out_of_range
jmp 0x40b0d7
mov eax, str.receive
jmp 0x40b0d7
mov eax, str.check_sequence
push eax
push ecx
push str.ERROR_rdm_send_receive___Status_failure:_0x_02x____s_n
jmp 0x40b0f6
movzx ecx, cl
movzx eax, al
push ecx
push eax
push str.ERROR_rdm_send_receive___Bad_CRC__0x_02x____0x_02x__n
jmp 0x40b0f6
push eax
push esi
push str.ERROR_rdm_send_receive___Bad_HID_size_vs_Data_size__0x_02x____0x_02x__n
call fcn.00409709
add esp, 0xc
jmp 0x40b14a
movzx eax, byte [ebp - 0x100]
push eax
push str.ERROR_rdm_send_receive___Bad_China_header__0x_02x__n
jmp 0x40b143
movzx eax, ax
push eax
push str.ERROR_rdm_send_receive___Bad_HID_size___hhu__n
jmp 0x40b143
movzx eax, byte [ebp - 0x108]
push eax
push str.ERROR_rdm_send_receive___Bad_HID_header__0x_02x__n
jmp 0x40b143
call dword [0x49e330]
push eax
push str.ERROR_rdm_send_receive___HidD_GetFeature__0x_08x__n
jmp 0x40b143
call dword [0x49e330]
push eax
push str.ERROR_rdm_send_receive___HidD_SetFeature__0x_08x__n
call fcn.00409709
pop ecx
pop ecx
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret