Function at 0x40b3c0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
push ebx
mov ebx, ecx
push ebp
push esi
mov al, byte [ebx + 4]
push edi
test al, al
jne 0x40b3ee
push 0x4213a8
lea ecx, [esp + 0x14]
call dword [sym.imp.MSVCRT.dll_public:_void___thiscall_exception::constructor_char_const__const_const__]
lea eax, [esp + 0x10]
push 0x41c9c0
push eax
call sub.MSVCRT.dll__CxxThrowException
mov esi, dword [esp + 0x28]
xor edi, edi
cmp esi, edi
je 0x40b602
mov ecx, dword [ebx + 0x3cc]
mov eax, esi
xor edx, edx
div ecx
test edx, edx
jne 0x40b602
mov eax, dword [esp + 0x2c]
cmp eax, 1
jne 0x40b4ed
mov edx, dword [esp + 0x20]
mov eax, esi
mov dword [esp + 0x20], edx
xor edx, edx
div ecx
mov ebp, dword [esp + 0x24]
mov dword [esp + 0x2c], edi
test eax, eax
jbe 0x40b4c5
mov eax, dword [esp + 0x20]
push ebp
push eax
mov ecx, ebx
call fcn.0040b0c0
mov cl, byte [ebx + 4]
mov eax, ebp
test cl, cl
je 0x40b4cf
mov ecx, dword [ebx + 0x3cc]
xor esi, esi
test ecx, ecx
jle 0x40b47c
mov ecx, ebx
sub ecx, ebp
lea edi, [ecx + 0x3f0]
mov dl, byte [edi + eax]
mov cl, byte [eax]
xor cl, dl
mov byte [eax], cl
mov ecx, dword [ebx + 0x3cc]
inc eax
inc esi
cmp esi, ecx
jl 0x40b467
mov ecx, dword [ebx + 0x3cc]
mov esi, dword [esp + 0x20]
mov eax, ecx
lea edi, [ebx + 0x3f0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x28]
and ecx, 3
xor edx, edx
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x3cc]
mov edi, dword [esp + 0x20]
div ecx
mov esi, dword [esp + 0x2c]
add edi, ecx
add ebp, ecx
inc esi
mov dword [esp + 0x20], edi
mov dword [esp + 0x2c], esi
cmp esi, eax
jb 0x40b43b
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0x10
push 0x4213a8
lea ecx, [esp + 0x14]
call dword [sym.imp.MSVCRT.dll_public:_void___thiscall_exception::constructor_char_const__const_const__]
lea ecx, [esp + 0x10]
push 0x41c9c0
push ecx
call sub.MSVCRT.dll__CxxThrowException
cmp eax, 2
mov dword [esp + 0x2c], edi
jne 0x40b5ba
mov eax, esi
xor edx, edx
div ecx
mov edi, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
mov dword [esp + 0x20], edi
test eax, eax
jbe 0x40b4c5
jmp 0x40b516
mov edi, dword [esp + 0x20]
lea eax, [ebx + 0x3f0]
push edi
push eax
mov ecx, ebx
call 0x40adc0
mov cl, byte [ebx + 4]
mov eax, edi
test cl, cl
je 0x40b59c
mov ecx, dword [ebx + 0x3cc]
xor esi, esi
test ecx, ecx
jle 0x40b54f
mov dl, byte [esi + ebp]
mov cl, byte [eax]
xor cl, dl
mov byte [eax], cl
mov ecx, dword [ebx + 0x3cc]
inc eax
inc esi
cmp esi, ecx
jl 0x40b53a
mov ecx, dword [ebx + 0x3cc]
mov esi, ebp
mov eax, ecx
lea edi, [ebx + 0x3f0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x28]
and ecx, 3
xor edx, edx
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x3cc]
mov esi, dword [esp + 0x20]
div ecx
add esi, ecx
add ebp, ecx
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x2c]
inc esi
mov dword [esp + 0x2c], esi
cmp esi, eax
jb 0x40b512
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0x10
push 0x4213a8
lea ecx, [esp + 0x14]
call dword [sym.imp.MSVCRT.dll_public:_void___thiscall_exception::constructor_char_const__const_const__]
lea ecx, [esp + 0x10]
push 0x41c9c0
push ecx
call sub.MSVCRT.dll__CxxThrowException
mov eax, esi
xor edx, edx
div ecx
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
test eax, eax
jbe 0x40b4c5
push ebp
push edi
mov ecx, ebx
call fcn.0040b0c0
mov ecx, dword [ebx + 0x3cc]
mov edx, dword [esp + 0x2c]
add edi, ecx
add ebp, ecx
inc edx
mov eax, esi
mov dword [esp + 0x2c], edx
xor edx, edx
div ecx
cmp dword [esp + 0x2c], eax
jb 0x40b5d0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0x10
push 0x4213ac
lea ecx, [esp + 0x14]
call dword [sym.imp.MSVCRT.dll_public:_void___thiscall_exception::constructor_char_const__const_const__]
lea edx, [esp + 0x10]
push 0x41c9c0
push edx
call sub.MSVCRT.dll__CxxThrowException