Function at 0x4047e0
Capabilities:
Encode data using xor

Disassembly:
push 0xffffffffffffffff
push 0x49a0e9
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x100
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov ecx, dword [esp + 0x120]
lea eax, [esp + 0x2c]
push eax
push ecx
mov ecx, ebp
mov dword [esp + 0x120], 0
call fcn.00401c00
mov eax, dword [esp + 0x4c]
or edi, 0xffffffff
cmp eax, edi
jne 0x404847
push 0x4c2a4c
lea ecx, [ebp + 0x11c]
call fcn.0048c58c
mov dword [esp + 0x118], edi
jmp 0x404ab7
test eax, eax
je 0x404882
cmp eax, 1
je 0x404882
cmp eax, 3
je 0x404882
cmp eax, 4
jne 0x404866
mov dword [esp + 0x118], edi
jmp 0x404ab7
push 0x4c2a14
lea ecx, [ebp + 0x11c]
call fcn.0048c58c
mov dword [esp + 0x118], edi
jmp 0x404ab7
lea esi, [ebp + 0x118]
lea edx, [esp + 0x14]
push 1
push edx
mov ecx, esi
call fcn.0048a360
mov eax, dword [eax]
push 0x4c2288
push eax
call fcn.0047514f
add esp, 8
lea ecx, [esp + 0x14]
test eax, eax
setne bl
call fcn.0048c403
test bl, bl
je 0x4048c4
push 0x4c2288
mov ecx, esi
call fcn.0048c7df
mov eax, dword [0x4cc854]
mov dword [esp + 0x10], eax
push 0x4c2398
lea ecx, [esp + 0x14]
mov byte [esp + 0x11c], 1
call fcn.0048c58c
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push ecx
push esi
push edx
call fcn.0048c632
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x11c], 2
call fcn.0048c53c
lea ecx, [esp + 0x14]
mov byte [esp + 0x118], 1
call fcn.0048c403
push ecx
lea eax, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x2c], esp
push eax
call fcn.0048c178
call fcn.004018d0
add esp, 4
test eax, eax
jne 0x404960
push 0x4c29ec
lea ecx, [ebp + 0x11c]
call fcn.0048c58c
lea ecx, [esp + 0x10]
mov byte [esp + 0x118], 0
call fcn.0048c403
mov dword [esp + 0x118], edi
jmp 0x404ab7
mov ecx, 0x2e
xor eax, eax
lea edi, [esp + 0x58]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x18]
call fcn.00490080
mov ecx, dword [esp + 0x10]
push 0
push 0x2002
push ecx
lea ecx, [esp + 0x24]
mov byte [esp + 0x124], 3
call fcn.00490192
test eax, eax
je 0x404a8a
mov eax, dword [esp + 0x124]
lea ecx, [esp + 0x18]
lea edx, [eax + eax*2]
shl edx, 3
sub edx, eax
mov eax, dword [esp + 0x54]
lea ebx, [eax + edx*8 + 0xe]
call fcn.0049048c
cmp eax, ebx
jbe 0x404a71
push 0
push ebx
lea ecx, [esp + 0x20]
call fcn.00490334
lea ecx, [esp + 0x58]
push 0xb8
push ecx
lea ecx, [esp + 0x20]
call fcn.004902af
mov esi, dword [esp + 0x128]
xor ecx, ecx
mov eax, dword [esi - 8]
test eax, eax
jle 0x404a0c
mov dl, byte [ebp + 4]
lea edi, [esp + 0x6c]
mov al, byte [ecx + esi]
add edi, 0xc
xor al, dl
inc ecx
mov byte [edi - 0xc], al
mov eax, dword [esi - 8]
cmp ecx, eax
jl 0x4049f9
push 0
push ebx
lea ecx, [esp + 0x20]
call fcn.00490334
lea edx, [esp + 0x58]
push 0xb8
push edx
lea ecx, [esp + 0x20]
call fcn.004902e9
lea ecx, [esp + 0x18]
call fcn.004903ad
lea ecx, [esp + 0x18]
mov byte [esp + 0x118], 1
call fcn.004900d5
lea ecx, [esp + 0x10]
mov byte [esp + 0x118], 0
call fcn.0048c403
lea ecx, [esp + 0x128]
mov dword [esp + 0x118], 0xffffffff
call fcn.0048c403
mov al, 1
jmp 0x404ac5
push str.Out_Range_of_Scroll_._in_GetChoiceQuizResult
lea ecx, [ebp + 0x11c]
call fcn.0048c58c
lea ecx, [esp + 0x18]
call fcn.004903ad
lea ecx, [esp + 0x18]
mov byte [esp + 0x118], 1
call fcn.004900d5
lea ecx, [esp + 0x10]
mov byte [esp + 0x118], 0
call fcn.0048c403
mov dword [esp + 0x118], 0xffffffff
lea ecx, [esp + 0x128]
call fcn.0048c403
xor al, al
mov ecx, dword [esp + 0x110]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x10c
ret 0xc