Function at 0x414310
Capabilities:
Encode data using xor

Disassembly:
push 0xffffffffffffffff
push 0x456dd3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x70
mov eax, dword [0x476a54]
xor eax, dword [esp + 0x7c]
push ebx
push ebp
push esi
mov ebp, ecx
mov dword [esp + 0x78], eax
push edi
mov dword [esp + 0x18], ebp
lea eax, [esp + 0x90]
lea esi, [ebp + 4]
xor ebx, ebx
push eax
mov ecx, esi
mov dword [esp + 0x8c], ebx
call fcn.00413af0
mov eax, dword [esi]
push 0x45a67d
push eax
call fcn.0043c80d
add esp, 8
test eax, eax
jne 0x414398
mov eax, dword [esp + 0x90]
add eax, 0xfffffff0
mov byte [ebp + 8], bl
mov dword [esp + 0x88], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x414571
lea ecx, [ebp + 0x1c]
call fcn.0040f0f0
mov eax, dword [esi]
push ebx
push ecx
sub eax, 0x10
mov dword [esp + 0x24], esp
mov edi, esp
push eax
call fcn.00406ba0
add eax, 0x10
add esp, 4
mov ecx, ebp
mov dword [edi], eax
call fcn.00413ee0
mov ebp, eax
mov eax, dword [ebp]
push 4
lea ecx, [esp + 0x18]
push ecx
mov ecx, ebp
call dword [eax + 0x34]
cmp dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
jle 0x41453d
push 0x1c
call fcn.00449098
mov esi, eax
add esp, 4
mov dword [esp + 0x20], esi
cmp esi, ebx
mov byte [esp + 0x88], 1
je 0x414426
mov ecx, esi
call fcn.00426320
mov byte [esp + 0x88], 2
mov dword [esi], 0x466090
call fcn.0044922a
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esi + 0x10], eax
jmp 0x414428
xor esi, esi
mov eax, dword [ebp]
push 0x58
lea ecx, [esp + 0x28]
push ecx
mov ecx, ebp
mov byte [esp + 0x90], bl
call dword [eax + 0x34]
mov al, byte [esp + 0x24]
test al, al
jns 0x41445b
xor eax, eax
jmp 0x414450
xor byte [esp + eax + 0x24], 0xcc
inc eax
cmp eax, 0x50
jl 0x414450
lea eax, [esp + 0x24]
lea edi, [esi + 0x10]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x414465
sub eax, edx
push eax
lea edx, [esp + 0x28]
push edx
mov ecx, edi
call fcn.004021a0
mov eax, dword [esp + 0x74]
mov dword [esi + 0x14], eax
mov ecx, dword [esp + 0x78]
mov dword [esi + 0x18], ecx
mov ecx, dword [esp + 0x18]
push esi
add ecx, 0x1c
call fcn.00401210
mov edx, dword [0x477970]
cmp byte [edx + 8], bl
jne 0x414528
mov eax, dword [esi + 0x18]
mov ecx, dword [edi]
push eax
push ecx
push ecx
mov ecx, esp
mov dword [esp + 0x2c], esp
push str.WAD_contents:__s___d_bytes_
call fcn.004022f0
mov eax, dword [0x477970]
lea edx, [esp + 0x28]
push edx
push eax
call fcn.004250e0
add esp, 0x14
mov ecx, dword [eax]
push ecx
push str.FileManager::useWad
push ecx
mov ecx, esp
mov dword [esp + 0x2c], esp
push str._s__:__s
mov byte [esp + 0x98], 3
call fcn.004022f0
mov edx, dword [0x477970]
mov eax, dword [edx + 4]
push eax
call fcn.00419450
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
add esp, 0x10
mov byte [esp + 0x88], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x414528
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x4143e1
mov eax, dword [ebp]
push 1
mov ecx, ebp
call dword [eax + 4]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x90]
add eax, 0xfffffff0
mov byte [ecx + 8], 1
mov dword [esp + 0x88], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41457b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x80]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x7c]
xor ecx, dword [esp + 0x8c]
call fcn.0043c4b6
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret 4