Function at 0x417a30
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, dword [0x58a8a0]
push esi
mov esi, dword [esp + 0xc]
shl esi, 7
add esi, ebp
push edi
mov eax, dword [esi + 0x6c]
mov ecx, dword [esi + 0x14]
mov edi, dword [esi + 0xc]
mov ebp, dword [esi + 0x10]
lea edx, [ecx + eax]
add edi, edx
mov edx, dword [esi + 0x18]
add ebp, edx
cmp eax, 0x2000
mov dword [esi + 0xc], edi
mov dword [esi + 0x10], ebp
jle 0x417a6f
add eax, 0xffffe000
mov dword [esi + 0x6c], eax
jmp 0x417a87
cmp eax, 0xffffe000
jge 0x417a80
add eax, 0x2000
mov dword [esi + 0x6c], eax
jmp 0x417a87
mov dword [esi + 0x6c], 0
mov edi, dword [esi + 0x1c]
mov eax, dword [esi + 0x20]
add ecx, edi
add eax, edx
mov dword [esi + 0x14], ecx
xor ecx, ecx
mov cl, byte [esi + 0x7d]
mov dword [esi + 0x18], eax
cmp dword [esi + 0x24], ecx
jle 0x417ab4
mov byte [esi + 0x41], 0xa
mov byte [esi + 0x3c], 0
mov dword [esi + 0x24], 0
mov byte [esi + 0x3b], 0
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0xc]
push edx
push eax
call fcn.00428740
mov ebp, eax
add esp, 8
cmp ebp, 1
jne 0x417c7b
cmp dword [0x5fcd10], 9
jne 0x417c68
cmp dword [esi + 0x78], 4
jbe 0x417c68
cmp dword [esi + 0x74], 8
jge 0x417c68
mov eax, dword [esi + 0x14]
mov edi, dword [esi + 0x6c]
mov edx, dword [esi + 0xc]
mov ecx, eax
add ecx, edi
sub edx, ecx
neg eax
mov dword [esi + 0xc], edx
mov edx, dword [esi + 0x1c]
mov dword [esi + 0x14], eax
mov al, byte [esi + 0x45]
neg edx
neg al
mov dword [esi + 0x1c], edx
mov byte [esi + 0x45], al
mov eax, dword [0x6087b0]
mov cl, al
sub al, 0x2c
add cl, 4
and eax, 0xff
and ecx, 0xff
mov eax, dword [eax + 0x608a20]
mov dword [0x6087b0], ecx
mov edi, dword [ecx + 0x608a20]
xor edi, eax
and eax, 0x7fff
sub eax, 0x3fff
mov dword [ecx + 0x608a20], edi
mov edx, dword [esi + 0x18]
shl eax, 4
sub eax, edx
cmp eax, 0xfff80000
mov dword [esi + 0x18], eax
jge 0x417b6d
mov dword [esi + 0x18], 0xfff80000
jmp 0x417b7b
cmp eax, 0x80000
jle 0x417b7b
mov dword [esi + 0x18], 0x80000
mov ecx, dword [0x6087b0]
xor edi, edi
mov al, cl
sub cl, 0x2c
add al, 4
and ecx, 0xff
and eax, 0xff
mov ecx, dword [ecx + 0x608a20]
mov dword [0x6087b0], eax
mov edx, dword [eax + 0x608a20]
xor edx, ecx
and ecx, 7
add ecx, 8
mov dword [eax + 0x608a20], edx
test ecx, ecx
jle 0x417c0b
movsx edx, byte [esi + 0x45]
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0xc]
neg edx
push edx
push eax
push ecx
call fcn.0046f790
mov ecx, dword [0x6087b0]
add esp, 0xc
mov al, cl
sub cl, 0x2c
add al, 4
and ecx, 0xff
and eax, 0xff
inc edi
mov ecx, dword [ecx + 0x608a20]
mov dword [0x6087b0], eax
mov edx, dword [eax + 0x608a20]
xor edx, ecx
and ecx, 7
add ecx, 8
mov dword [eax + 0x608a20], edx
cmp edi, ecx
jl 0x417bb8
mov dl, al
sub al, 0x2c
add dl, 4
and eax, 0xff
and edx, 0xff
push 0
mov eax, dword [eax + 0x608a20]
mov ecx, edx
mov dword [0x6087b0], ecx
push 0
mov edx, dword [ecx + 0x608a20]
xor edx, eax
and eax, 3
mov dword [ecx + 0x608a20], edx
mov ecx, dword [esi + 0x10]
mov eax, dword [eax*4 + str._t_n_v_f]
mov edx, dword [esi + 0xc]
push eax
push ecx
push edx
call fcn.00478870
mov eax, dword [esi + 0x74]
add esp, 0x14
inc eax
mov dword [esi + 0x78], 0
mov dword [esi + 0x74], eax
jmp 0x417c7b
mov byte [esi + 0x41], 0xa
mov byte [esi + 0x3c], 0
mov dword [esi + 0x24], 0
mov byte [esi + 0x3b], 0
mov ecx, dword [esi + 0x78]
inc ecx
cmp ebp, 0xfffffffe
mov dword [esi + 0x78], ecx
jne 0x417c8b
mov byte [esi + 0x41], 3
mov edx, dword [esi + 0x24]
inc edx
mov eax, edx
mov dword [esi + 0x24], edx
test al, 3
jne 0x417cbb
mov cl, byte [esi + 0x3c]
xor edx, edx
mov dx, word [esi + 0x34]
inc cl
mov byte [esi + 0x3c], cl
xor edi, edi
mov di, word [edx*8 + 0x54f9c0]
movsx ecx, cl
cmp ecx, edi
jl 0x417cbb
mov byte [esi + 0x3c], 0
movsx ecx, byte [esi + 0x3c]
xor edx, edx
xor edi, edi
mov dx, word [esi + 0x34]
cmp eax, 8
mov edx, dword [edx*8 + 0x54f9c4]
mov di, word [edx + ecx*2]
mov dword [esi + 0x28], edi
jle 0x417d45
cmp dword [0x5db7ec], 1
jne 0x417ce7
and al, 7
jmp 0x417ce9
and al, 0xf
neg al
sbb eax, eax
inc eax
test eax, eax
je 0x417d38
mov eax, dword [esi + 0x10]
mov ecx, dword [0x5d01a4]
cmp eax, ecx
jle 0x417d21
push 0
push 0x1d
push eax
mov eax, dword [esi + 0xc]
push eax
call fcn.0042feb0
mov eax, dword [esp + 0x20]
add esp, 0x10
push eax
call fcn.0045f480
add esp, 4
pop edi
pop esi
pop ebp
ret
mov ecx, dword [0x54f800]
mov edx, dword [esi + 0xc]
add ecx, 0x47
push ecx
push eax
push edx
call fcn.00427000
add esp, 0xc
mov eax, dword [esp + 0x10]
push eax
call fcn.0045f480
add esp, 4
pop edi
pop esi
pop ebp
ret