Function at 0x4189a0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
push ebx
mov ebx, ecx
push ebp
push esi
mov al, byte [ebx + 0x3a84]
push edi
test al, al
jne 0x4189d1
push 0x437724
lea ecx, [esp + 0x14]
call dword [sym.imp.MSVCRT.dll_public:_void___thiscall_exception::constructor_char_const__const_const__]
lea eax, [esp + 0x10]
push 0x431328
push eax
call sub.MSVCRT.dll__CxxThrowException
mov edi, dword [esp + 0x28]
xor esi, esi
cmp edi, esi
je 0x418be9
mov ecx, dword [ebx + 0x3e4c]
mov eax, edi
xor edx, edx
div ecx
test edx, edx
jne 0x418be9
mov eax, dword [esp + 0x2c]
cmp eax, 1
jne 0x418acf
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
mov eax, edi
xor edx, edx
div ecx
mov dword [esp + 0x2c], esi
test eax, eax
jbe 0x418aa7
lea ebp, [ebx + 0x3e74]
mov dl, byte [ebx + 0x3a84]
mov eax, ebp
test dl, dl
je 0x418ab1
xor edi, edi
test ecx, ecx
jle 0x418a55
mov esi, dword [esp + 0x20]
sub esi, ebp
mov cl, byte [esi + eax]
mov dl, byte [eax]
xor dl, cl
mov byte [eax], dl
mov ecx, dword [ebx + 0x3e4c]
inc eax
inc edi
cmp edi, ecx
jl 0x418a40
mov esi, dword [esp + 0x24]
mov ecx, ebx
push esi
push ebp
call fcn.00418380
mov ecx, dword [ebx + 0x3e4c]
mov edi, ebp
mov edx, ecx
mov eax, dword [esp + 0x24]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x20]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x3e4c]
mov esi, dword [esp + 0x2c]
add edx, ecx
add eax, ecx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x28]
xor edx, edx
div ecx
inc esi
mov dword [esp + 0x2c], esi
cmp esi, eax
jb 0x418a28
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0x10
push 0x437724
lea ecx, [esp + 0x14]
call dword [sym.imp.MSVCRT.dll_public:_void___thiscall_exception::constructor_char_const__const_const__]
lea eax, [esp + 0x10]
push 0x431328
push eax
call sub.MSVCRT.dll__CxxThrowException
cmp eax, 2
mov dword [esp + 0x2c], esi
jne 0x418ba1
mov edx, dword [esp + 0x20]
mov eax, edi
mov dword [esp + 0x20], edx
xor edx, edx
div ecx
mov ebp, dword [esp + 0x24]
test eax, eax
jbe 0x418aa7
lea eax, [ebx + 0x3e74]
push ebp
push eax
mov ecx, ebx
call fcn.00418380
mov cl, byte [ebx + 0x3a84]
mov eax, ebp
test cl, cl
je 0x418b83
mov ecx, dword [ebx + 0x3e4c]
xor esi, esi
test ecx, ecx
jle 0x418b32
mov ecx, dword [esp + 0x20]
mov dl, byte [esi + ecx]
mov cl, byte [eax]
xor cl, dl
mov byte [eax], cl
mov ecx, dword [ebx + 0x3e4c]
inc eax
inc esi
cmp esi, ecx
jl 0x418b19
mov ecx, dword [ebx + 0x3e4c]
mov esi, ebp
mov eax, ecx
lea edi, [ebx + 0x3e74]
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 + 0x3e4c]
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 0x418af2
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0x10
push 0x437724
lea ecx, [esp + 0x14]
call dword [sym.imp.MSVCRT.dll_public:_void___thiscall_exception::constructor_char_const__const_const__]
lea ecx, [esp + 0x10]
push 0x431328
push ecx
call sub.MSVCRT.dll__CxxThrowException
mov eax, edi
xor edx, edx
div ecx
mov esi, dword [esp + 0x20]
mov ebp, dword [esp + 0x24]
test eax, eax
jbe 0x418aa7
push ebp
push esi
mov ecx, ebx
call fcn.00418380
mov ecx, dword [ebx + 0x3e4c]
mov edx, dword [esp + 0x2c]
add esi, ecx
add ebp, ecx
inc edx
mov eax, edi
mov dword [esp + 0x2c], edx
xor edx, edx
div ecx
cmp dword [esp + 0x2c], eax
jb 0x418bb7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0x10
push 0x437728
lea ecx, [esp + 0x14]
call dword [sym.imp.MSVCRT.dll_public:_void___thiscall_exception::constructor_char_const__const_const__]
lea edx, [esp + 0x10]
push 0x431328
push edx
call sub.MSVCRT.dll__CxxThrowException
nop
nop
nop
nop
nop
nop
nop
nop
nop