Function at 0x405d30
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x40
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], esi
mov di, word [0x49faa6]
movsx eax, di
mov ecx, dword [0x49b9d8]
imul ecx, eax
mov dword [0x49b9d8], ecx
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov eax, dword [0x499840]
and eax, 0x2f72422c
mov dword [0x499840], eax
mov eax, dword [0x499218]
or eax, 0x997e7cff
mov dword [0x499218], eax
cmp dword [esp + 0x2c], 0
jle 0x40601f
mov eax, 0x8050000
mov cx, word [0x4a03cc]
movsx edx, cx
sar edx, 2
imul edx, edx, 0xa15fdf6d
cmp eax, edx
jl 0x405ded
mov eax, dword [0x49cd94]
imul eax, eax, 0xf61d0113
add eax, 0xd628abfc
mov ecx, dword [0x495e4c]
and ecx, eax
mov dword [0x495e4c], ecx
jmp 0x405dfc
mov eax, dword [0x498558]
add eax, 0x97b9e084
mov dword [0x498558], eax
mov eax, 0xa7fba00a
mov ecx, dword [0x497a30]
add ecx, 0x80429001
mov dword [0x497a30], ecx
mov ecx, dword [0x49aa74]
or ecx, 0x33d7ffc7
mov dword [0x49aa74], ecx
mov ecx, dword [0x497ed8]
cmp eax, ecx
jne 0x405e47
mov eax, dword [0x499210]
add eax, 0x779a6e7e
mov dword [0x499210], eax
jmp 0x405e56
mov eax, dword [0x49ada8]
and eax, 0x29df2f9d
mov dword [0x49ada8], eax
mov eax, dword [esp + 0x30]
mov ecx, eax
add ecx, 4
mov dword [esp + 0x30], ecx
mov eax, dword [eax]
mov ecx, dword [esp + 0x38]
mul ecx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
mov eax, dword [0x495ac4]
xor eax, 0xc0447230
mov dword [0x495ac4], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], eax
mov eax, dword [0x495fd4]
imul eax, eax, 0xe1ad71af
mov ecx, dword [0x497608]
add ecx, eax
mov dword [0x497608], ecx
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], eax
mov eax, dword [0x499710]
shl eax, 6
mov ecx, dword [0x4996b4]
inc ecx
or eax, ecx
mov dword [0x4996b4], ecx
or eax, 0xc383
mov si, word [0x49d900]
mov cx, si
xor ecx, eax
mov si, cx
mov word [0x49d900], si
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x14]
add ecx, eax
mov dword [esp + 0x14], ecx
mov eax, dword [0x495b24]
or eax, 0xb49d9b2a
mov dword [0x495b24], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x28]
sub eax, ecx
mov ecx, dword [esp + 0x10]
adc ecx, 0
mov dword [esp + 0x10], ecx
mov ecx, dword [0x49bac4]
mov edx, ecx
inc edx
mov dword [0x49bac4], edx
add ecx, 0x8a824c07
mov edx, dword [0x496724]
or edx, ecx
mov dword [0x496724], edx
mov ecx, dword [esp + 0x34]
mov ecx, dword [ecx]
mov edx, dword [esp + 0x14]
add edx, ecx
mov dword [esp + 0x14], edx
mov ecx, dword [0x499a4c]
add ecx, 0x81b725b9
mov dword [0x499a4c], ecx
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x34]
mov edx, dword [edx]
sub ecx, edx
mov edx, dword [esp + 0x10]
adc edx, 0
mov dword [esp + 0x10], edx
mov edx, dword [0x498f88]
add edx, 0xf7c7b16a
mov dword [0x498f88], edx
mov edx, dword [esp + 0x10]
mov dword [esp + 0x28], edx
mov edx, dword [0x49c778]
and edx, 0x914097f7
mov edi, dword [0x49773c]
imul edi, edx
mov dword [0x49773c], edi
mov edx, dword [esp + 0x14]
mov edi, dword [esp + 0x34]
mov ebx, edi
add ebx, 4
mov dword [esp + 0x34], ebx
mov dword [edi], edx
mov edx, dword [0x49bc00]
add edx, 0x6529f0fd
or edx, 0x3fba24f2
mov edi, dword [0x497a34]
dec edi
mov dword [0x497a34], edi
or edi, 0xe085ecd6
cmp edx, edi
mov dword [esp + 0xc], eax
mov dword [esp + 8], ecx
je 0x405ff7
mov eax, dword [0x499d08]
xor eax, 0xf42fc44
mov dword [0x499d08], eax
mov ax, word [0x49e328]
mov cx, ax
xor ecx, 0x6cd1
mov ax, cx
mov word [0x49e328], ax
mov eax, dword [esp + 0x2c]
add eax, 0xffffffff
mov dword [esp + 0x2c], eax
jmp 0x405d9f
mov ax, word [0x49ed4a]
movsx ecx, ax
add ecx, 0xb55a5160
mov edx, dword [0x497ee0]
imul edx, ecx
mov dword [0x497ee0], edx
mov ecx, dword [esp + 0x24]
inc ecx
mov dword [esp + 0x24], ecx
mov ecx, dword [0x498fa0]
mov edx, dword [0x49d024]
imul ecx, edx
and ecx, 0x2482d616
mov edx, dword [0x49822c]
imul edx, ecx
mov dword [0x49822c], edx
mov ax, word [0x49eb9a]
movsx ecx, ax
xor ecx, 0x80a8301
or ecx, 0xf1452c48
mov edx, dword [0x49cbb0]
add edx, ecx
mov dword [0x49cbb0], edx
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x34]
mov esi, dword [edx]
add esi, ecx
mov dword [edx], esi
mov ecx, dword [0x498168]
shr ecx, 2
mov edx, dword [0x49b008]
mov esi, edx
dec esi
mov dword [0x49b008], esi
and ecx, edx
xor ecx, 0x3637
mov ax, word [0x4a067a]
mov dx, ax
add edx, ecx
mov ax, dx
mov word [0x4a067a], ax
mov ecx, dword [esp + 0x34]
mov ecx, dword [ecx]
mov edx, dword [esp + 0x28]
sub ecx, edx
sbb edx, edx
and edx, 1
mov dword [esp + 0x28], edx
mov edx, dword [0x497da8]
shl edx, 3
mov esi, 0x8653032
sub esi, edx
mov dword [0x4982ac], esi
mov edx, dword [esp + 0x34]
add edx, 4
mov dword [esp + 0x34], edx
mov edx, dword [0x49b214]
imul edx, edx, 0xa403b9a4
mov dword [0x49b214], edx
mov dword [esp + 4], ecx
cmp dword [esp + 0x28], 0
jne 0x40606a
mov eax, dword [0x495fcc]
imul eax, eax, 0xb5437bff
mov dword [0x495fcc], eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret