Function at 0x417890
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, dword [0x5adec0]
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 0x4178cf
add eax, 0xffffe000
mov dword [esi + 0x6c], eax
jmp 0x4178e7
cmp eax, 0xffffe000
jge 0x4178e0
add eax, 0x2000
mov dword [esi + 0x6c], eax
jmp 0x4178e7
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 0x417914
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.004288a0
mov ebp, eax
add esp, 8
cmp ebp, 1
jne 0x417ad9
cmp dword [0x620330], 9
jne 0x417ac6
cmp dword [esi + 0x78], 4
jbe 0x417ac6
cmp dword [esi + 0x74], 8
jge 0x417ac6
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 0x6c]
mov edx, dword [esi + 0xc]
add ecx, eax
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 [0x62bdd0]
mov cl, al
sub al, 0x2c
add cl, 4
and eax, 0xff
and ecx, 0xff
mov eax, dword [eax + 0x62c040]
mov dword [0x62bdd0], ecx
mov edi, dword [ecx + 0x62c040]
xor edi, eax
and eax, 0x7fff
sub eax, 0x3fff
mov dword [ecx + 0x62c040], edi
mov edx, dword [esi + 0x18]
shl eax, 4
sub eax, edx
cmp eax, 0xfff80000
mov dword [esi + 0x18], eax
jge 0x4179cb
mov dword [esi + 0x18], 0xfff80000
jmp 0x4179d9
cmp eax, 0x80000
jle 0x4179d9
mov dword [esi + 0x18], 0x80000
mov ecx, dword [0x62bdd0]
xor edi, edi
mov al, cl
sub cl, 0x2c
add al, 4
and ecx, 0xff
and eax, 0xff
mov ecx, dword [ecx + 0x62c040]
mov dword [0x62bdd0], eax
mov edx, dword [eax + 0x62c040]
xor edx, ecx
and ecx, 7
add ecx, 8
mov dword [eax + 0x62c040], edx
test ecx, ecx
jle 0x417a69
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.0046eb70
mov ecx, dword [0x62bdd0]
add esp, 0xc
mov al, cl
sub cl, 0x2c
add al, 4
and ecx, 0xff
and eax, 0xff
inc edi
mov ecx, dword [ecx + 0x62c040]
mov dword [0x62bdd0], eax
mov edx, dword [eax + 0x62c040]
xor edx, ecx
and ecx, 7
add ecx, 8
mov dword [eax + 0x62c040], edx
cmp edi, ecx
jl 0x417a16
mov dl, al
sub al, 0x2c
add dl, 4
and eax, 0xff
and edx, 0xff
push 0
mov eax, dword [eax + 0x62c040]
mov ecx, edx
mov dword [0x62bdd0], ecx
push 0
mov edx, dword [ecx + 0x62c040]
xor edx, eax
and eax, 3
mov dword [ecx + 0x62c040], 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.00477d10
mov eax, dword [esi + 0x74]
add esp, 0x14
inc eax
mov dword [esi + 0x78], 0
mov dword [esi + 0x74], eax
jmp 0x417ad9
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 0x417ae9
mov byte [esi + 0x41], 3
mov edx, dword [esi + 0x24]
inc edx
mov eax, edx
mov dword [esi + 0x24], edx
test al, 3
jne 0x417b19
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 + 0x55f460]
movsx ecx, cl
cmp ecx, edi
jl 0x417b19
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 + 0x55f464]
mov di, word [edx + ecx*2]
mov dword [esi + 0x28], edi
jle 0x417ba3
cmp dword [0x5fee0c], 1
jne 0x417b45
and al, 7
jmp 0x417b47
and al, 0xf
neg al
sbb eax, eax
inc eax
test eax, eax
je 0x417b96
mov eax, dword [esi + 0x10]
mov ecx, dword [0x5f37c4]
cmp eax, ecx
jle 0x417b7f
push 0
push 0x1d
push eax
mov eax, dword [esi + 0xc]
push eax
call fcn.0042fdc0
mov eax, dword [esp + 0x20]
add esp, 0x10
push eax
call fcn.0045ed00
add esp, 4
pop edi
pop esi
pop ebp
ret
mov ecx, dword [0x55f280]
mov edx, dword [esi + 0xc]
add ecx, 0x47
push ecx
push eax
push edx
call fcn.00427170
add esp, 0xc
mov eax, dword [esp + 0x10]
push eax
call fcn.0045ed00
add esp, 4
pop edi
pop esi
pop ebp
ret