Function at 0x10059c60
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push edi
mov edi, dword [ebp + 8]
mov ebx, ecx
mov dword [ebp - 8], ebx
movzx eax, byte [edi]
cmp eax, 8
ja case.default.0x10059c7d
push esi
jmp dword [eax*4 + 0x1005a478]
mov eax, dword [ebx]
mov dword [ebp - 0xc], eax
mov esi, dword [eax]
mov eax, dword [edi + 8]
cmp dword [eax + 4], 0
jne 0x10059cb4
mov esi, dword [esi + 4]
mov ecx, esi
push 2
push 0x101047f4
call dword [0x100f4524]
mov ecx, dword [ebp - 0xc]
call esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
cmp byte [ebp + 0xc], 0
je 0x10059ed0
mov esi, dword [esi + 4]
mov ecx, esi
push 2
push 0x101047f8
call dword [0x100f4524]
mov ecx, dword [ebp - 0xc]
call esi
mov ecx, dword [ebp + 0x18]
add ecx, dword [ebp + 0x14]
mov eax, dword [ebx + 0x260]
cmp eax, ecx
jae 0x10059cf5
push 0x20
add eax, eax
lea ecx, [ebx + 0x250]
push eax
call fcn.1005d020
mov eax, dword [edi + 8]
mov dword [ebp - 0x18], 0
mov esi, dword [eax]
mov eax, dword [eax + 4]
mov esi, dword [esi]
mov dword [ebp - 0xc], esi
sub eax, 1
je 0x10059de2
cmp dword [ebx + 0x264], 0x10
lea ecx, [ebx + 0x250]
mov edi, dword [ebx]
mov eax, dword [edi]
mov edx, dword [eax + 4]
mov eax, ecx
mov dword [ebp - 0x10], edx
jb 0x10059d2f
mov eax, dword [ecx]
mov ecx, dword [ebp + 0x14]
add ecx, dword [ebp + 0x18]
push ecx
mov ecx, dword [ebp - 0x10]
push eax
call dword [0x100f4524]
mov ecx, edi
call dword [ebp - 0x10]
mov ebx, dword [ebp - 8]
push 0x22
mov ebx, dword [ebx]
mov eax, dword [ebx]
mov edi, dword [eax]
mov ecx, edi
call dword [0x100f4524]
mov ecx, ebx
call edi
push dword [ebp + 0x10]
mov ebx, dword [ebp - 8]
lea eax, [esi + 0x10]
push eax
mov ecx, ebx
call fcn.1005a4a0
mov ebx, dword [ebx]
push 3
push 0x101047fc
mov eax, dword [ebx]
mov edi, dword [eax + 4]
mov ecx, edi
call dword [0x100f4524]
mov ecx, ebx
call edi
mov ecx, dword [ebp + 0x14]
add esi, 0x28
mov eax, dword [ebp + 0x18]
mov ebx, dword [ebp - 8]
add eax, ecx
push eax
push ecx
push dword [ebp + 0x10]
mov ecx, ebx
push 1
push esi
call fcn.10059c60
mov edi, dword [ebx]
push 2
push 0x10104800
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x100f4524]
mov ecx, edi
call esi
mov esi, dword [ebp - 0x18]
lea ecx, [ebp - 0xc]
inc esi
mov dword [ebp - 0x18], esi
call fcn.10032150
mov edi, dword [ebp + 8]
mov eax, dword [edi + 8]
mov eax, dword [eax + 4]
dec eax
cmp esi, eax
mov esi, dword [ebp - 0xc]
jb 0x10059d12
cmp dword [ebx + 0x264], 0x10
lea ecx, [ebx + 0x250]
mov edi, dword [ebx]
mov eax, dword [edi]
mov eax, dword [eax + 4]
mov dword [ebp - 0x18], eax
jb 0x10059e01
mov ecx, dword [ebx + 0x250]
mov eax, dword [ebp + 0x14]
add eax, dword [ebp + 0x18]
mov ebx, dword [ebp - 0x18]
push eax
push ecx
mov ecx, ebx
call dword [0x100f4524]
mov ecx, edi
call ebx
mov ebx, dword [ebp - 8]
push 0x22
mov ebx, dword [ebx]
mov eax, dword [ebx]
mov edi, dword [eax]
mov ecx, edi
call dword [0x100f4524]
mov ecx, ebx
call edi
push dword [ebp + 0x10]
mov ebx, dword [ebp - 8]
lea eax, [esi + 0x10]
push eax
mov ecx, ebx
call fcn.1005a4a0
mov ebx, dword [ebx]
push 3
push 0x101047fc
mov eax, dword [ebx]
mov edi, dword [eax + 4]
mov ecx, edi
call dword [0x100f4524]
mov ecx, ebx
call edi
mov ecx, dword [ebp + 0x14]
add esi, 0x28
mov eax, dword [ebp + 0x18]
mov ebx, dword [ebp - 8]
add eax, ecx
push eax
push ecx
push dword [ebp + 0x10]
mov ecx, ebx
push 1
push esi
call fcn.10059c60
mov edi, dword [ebx]
push 0xa
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x100f4524]
mov ecx, edi
call esi
cmp dword [ebx + 0x264], 0x10
mov edi, dword [ebx]
mov eax, dword [edi]
mov esi, dword [eax + 4]
lea eax, [ebx + 0x250]
jb 0x10059ea3
mov eax, dword [eax]
push dword [ebp + 0x18]
mov ecx, esi
push eax
call dword [0x100f4524]
mov ecx, edi
call esi
mov edi, dword [ebx]
push 0x7d
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x100f4524]
mov ecx, edi
call esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov esi, dword [esi]
mov ecx, esi
push 0x7b
call dword [0x100f4524]
mov ecx, dword [ebp - 0xc]
call esi
mov eax, dword [edi + 8]
mov dword [ebp - 0x18], 0
mov esi, dword [eax]
mov eax, dword [eax + 4]
mov esi, dword [esi]
mov dword [ebp - 0xc], esi
sub eax, 1
je 0x10059f90
nop
mov ebx, dword [ebx]
push 0x22
mov eax, dword [ebx]
mov edi, dword [eax]
mov ecx, edi
call dword [0x100f4524]
mov ecx, ebx
call edi
push dword [ebp + 0x10]
mov ebx, dword [ebp - 8]
lea eax, [esi + 0x10]
push eax
mov ecx, ebx
call fcn.1005a4a0
mov ebx, dword [ebx]
push 2
push 0x10104804
mov eax, dword [ebx]
mov edi, dword [eax + 4]
mov ecx, edi
call dword [0x100f4524]
mov ecx, ebx
call edi
push dword [ebp + 0x18]
mov ebx, dword [ebp - 8]
add esi, 0x28
push dword [ebp + 0x14]
mov ecx, ebx
push dword [ebp + 0x10]
push 0
push esi
call fcn.10059c60
mov edi, dword [ebx]
push 0x2c
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x100f4524]
mov ecx, edi
call esi
mov esi, dword [ebp - 0x18]
lea ecx, [ebp - 0xc]
inc esi
mov dword [ebp - 0x18], esi
call fcn.10032150
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 8]
mov eax, dword [eax + 4]
dec eax
cmp esi, eax
mov esi, dword [ebp - 0xc]
jb 0x10059f00
mov ebx, dword [ebx]
push 0x22
mov eax, dword [ebx]
mov edi, dword [eax]
mov ecx, edi
call dword [0x100f4524]
mov ecx, ebx
call edi
push dword [ebp + 0x10]
mov ebx, dword [ebp - 8]
lea eax, [esi + 0x10]
push eax
mov ecx, ebx
call fcn.1005a4a0
mov ebx, dword [ebx]
push 2
push 0x10104804
mov eax, dword [ebx]
mov edi, dword [eax + 4]
mov ecx, edi
call dword [0x100f4524]
mov ecx, ebx
call edi
push dword [ebp + 0x18]
mov ebx, dword [ebp - 8]
add esi, 0x28
push dword [ebp + 0x14]
mov ecx, ebx
push dword [ebp + 0x10]
push 0
push esi
call fcn.10059c60
mov edi, dword [ebx]
push 0x7d
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x100f4524]
mov ecx, edi
call esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [ebx]
mov edx, dword [edi + 8]
mov dword [ebp - 0xc], eax
mov esi, dword [eax]
mov eax, dword [edx]
cmp eax, dword [edx + 4]
jne 0x1005a036
mov esi, dword [esi + 4]
mov ecx, esi
push 2
push 0x100f6ae8
call dword [0x100f4524]
mov ecx, dword [ebp - 0xc]
call esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
cmp byte [ebp + 0xc], 0
je 0x1005a1b9
mov esi, dword [esi + 4]
mov ecx, esi
push 2
push 0x10104808
call dword [0x100f4524]
mov ecx, dword [ebp - 0xc]
call esi
mov eax, dword [ebp + 0x14]
add eax, dword [ebp + 0x18]
mov edx, dword [ebx + 0x260]
cmp edx, eax
jae 0x1005a078
push 0x20
lea eax, [edx + edx]
lea ecx, [ebx + 0x250]
push eax
call fcn.1005d020
mov eax, dword [edi + 8]
mov esi, dword [eax]
mov eax, dword [eax + 4]
sub eax, 0x10
cmp esi, eax
je 0x1005a10b
lea ecx, [ebx + 0x250]
cmp dword [ecx + 0x14], 0x10
mov edi, dword [ebx]
mov eax, dword [edi]
mov edx, dword [eax + 4]
mov eax, ecx
mov dword [ebp - 0x18], edx
jb 0x1005a0a5
mov eax, dword [ecx]
mov ecx, dword [ebp + 0x14]
add ecx, dword [ebp + 0x18]
push ecx
mov ecx, dword [ebp - 0x18]
push eax
call dword [0x100f4524]
mov ecx, edi
call dword [ebp - 0x18]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x18]
mov ebx, dword [ebp - 8]
add eax, ecx
push eax
push ecx
push dword [ebp + 0x10]
mov ecx, ebx
push 1
push esi
call fcn.10059c60
mov ebx, dword [ebx]
push 2
push 0x10104800
mov eax, dword [ebx]
mov edi, dword [eax + 4]
mov ecx, edi
call dword [0x100f4524]
mov ecx, ebx
call edi
mov edi, dword [ebp + 8]
add esi, 0x10
mov ebx, dword [ebp - 8]
mov eax, dword [edi + 8]
lea ecx, [ebx + 0x250]
mov eax, dword [eax + 4]
sub eax, 0x10
cmp esi, eax
jne 0x1005a091
cmp dword [ebx + 0x264], 0x10
lea ecx, [ebx + 0x250]
mov eax, dword [ebx]
mov dword [ebp - 0x18], eax
mov eax, dword [eax]
mov edx, dword [eax + 4]
mov dword [ebp - 0x10], edx
jb 0x1005a12d
mov ecx, dword [ebx + 0x250]
mov esi, dword [ebp + 0x14]
add esi, dword [ebp + 0x18]
push esi
push ecx
mov ecx, edx
call dword [0x100f4524]
mov ecx, dword [ebp - 0x18]
call dword [ebp - 0x10]
mov edi, dword [ebp + 8]
mov ecx, ebx
push esi
push dword [ebp + 0x14]
mov eax, dword [edi + 8]
push dword [ebp + 0x10]
push 1
mov eax, dword [eax + 4]
sub eax, 0x10
push eax
call fcn.10059c60
mov edi, dword [ebx]
push 0xa
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x100f4524]
mov ecx, edi
call esi
cmp dword [ebx + 0x264], 0x10
mov edi, dword [ebx]
mov eax, dword [edi]
mov esi, dword [eax + 4]
lea eax, [ebx + 0x250]
jb 0x1005a18c
mov eax, dword [eax]
push dword [ebp + 0x18]
mov ecx, esi
push eax
call dword [0x100f4524]
mov ecx, edi
call esi
mov edi, dword [ebx]
push 0x5d
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x100f4524]
mov ecx, edi
call esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov esi, dword [esi]
mov ecx, esi
push 0x5b
call dword [0x100f4524]
mov ecx, dword [ebp - 0xc]
call esi
mov ecx, dword [edi + 8]
mov edx, dword [ebp + 0x14]
mov edi, dword [ebp + 0x10]
mov eax, dword [ecx + 4]
mov esi, dword [ecx]
sub eax, 0x10
cmp esi, eax
mov eax, dword [ebp + 0x18]
je 0x1005a222
push eax
push edx
push edi
push 0
push esi
mov ecx, ebx
call fcn.10059c60
mov ebx, dword [ebx]
push 0x2c
mov eax, dword [ebx]
mov edi, dword [eax]
mov ecx, edi
call dword [0x100f4524]
mov ecx, ebx
call edi
mov eax, dword [ebp + 8]
add esi, 0x10
mov ebx, dword [ebp - 8]
mov edx, dword [ebp + 0x14]
mov edi, dword [ebp + 0x10]
mov ecx, dword [eax + 8]
mov eax, dword [ecx + 4]
sub eax, 0x10
cmp esi, eax
mov eax, dword [ebp + 0x18]
jne 0x1005a1e2
push eax
mov eax, dword [ecx + 4]
mov ecx, ebx
push edx
push edi
push 0
sub eax, 0x10
push eax
call fcn.10059c60
mov edi, dword [ebx]
push 0x5d
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x100f4524]
mov ecx, edi
call esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov edi, dword [ebx]
push 0x22
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x100f4524]
mov ecx, edi
call esi
mov eax, dword [ebp + 8]
mov ecx, ebx
push dword [ebp + 0x10]
push dword [eax + 8]
call fcn.1005a4a0
mov edi, dword [ebx]
push 0x22
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x100f4524]
mov ecx, edi
call esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
cmp byte [edi + 8], 0
mov ebx, dword [ebx]
mov eax, dword [ebx]
mov esi, dword [eax + 4]
mov ecx, esi
je 0x1005a2bc
push 4
push str.true
call dword [0x100f4524]
mov ecx, ebx
call esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
push 5
push str.false
call dword [0x100f4524]
mov ecx, ebx
call esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [edi + 8]
mov ecx, dword [edi + 0xc]
mov edi, eax
or eax, ecx
je 0x1005a36d
test ecx, ecx
jg 0x1005a2f6
jl 0x1005a2f0
test edi, edi
jne 0x1005a2f6
mov byte [ebp - 1], 1
jmp 0x1005a2fa
mov byte [ebp - 1], 0
lea edx, [ebx + 8]
xor esi, esi
mov dword [ebp - 0x18], edx
xor ebx, ebx
push 0
push 0xa
push ecx
push edi
call fcn.100c1400
mov esi, eax
mov dword [ebp - 0x10], edx
lea ecx, [esi + esi*4]
add ecx, ecx
sub edi, ecx
mov ecx, dword [ebp - 0x10]
mov eax, edi
mov edi, esi
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 0x18]
add al, 0x30
mov byte [ebx + edx], al
mov eax, edi
inc ebx
or eax, ecx
jne 0x1005a304
mov dword [ebp - 0x18], ebx
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0x18]
cmp byte [ebp - 1], al
je 0x1005a34a
mov byte [esi + ebx + 8], 0x2d
inc esi
lea eax, [esi + edx]
push eax
push edx
call fcn.100bed80
add esp, 8
lea edx, [ebx + 8]
push esi
push edx
jmp 0x1005a45c
mov eax, dword [edi + 8]
mov ecx, dword [edi + 0xc]
mov edi, eax
or eax, ecx
jne 0x1005a38a
mov edi, dword [ebx]
push 0x30
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x100f4524]
mov ecx, edi
call esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
test ecx, ecx
ja 0x1005a39a
jb 0x1005a394
test edi, edi
jne 0x1005a39a
mov byte [ebp - 1], 1
jmp 0x1005a39e
mov byte [ebp - 1], 0
lea edx, [ebx + 8]
xor esi, esi
mov dword [ebp - 0x18], edx
xor ebx, ebx
push 0
push 0xa
push ecx
push edi
call fcn.100c14b0
mov esi, eax
mov dword [ebp - 0x10], edx
lea ecx, [esi + esi*4]
add ecx, ecx
sub edi, ecx
mov ecx, dword [ebp - 0x10]
mov eax, edi
mov edi, esi
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 0x18]
add al, 0x30
mov byte [ebx + edx], al
mov eax, edi
inc ebx
or eax, ecx
jne 0x1005a3a8
mov dword [ebp - 0x18], ebx
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0x18]
cmp byte [ebp - 1], al
je 0x1005a3ee
mov byte [esi + ebx + 8], 0x2d
inc esi
lea eax, [esi + edx]
push eax
push edx
call fcn.100bed80
add esp, 8
lea edx, [ebx + 8]
push esi
push edx
jmp 0x1005a45c
movsd xmm0, qword [edi + 8]
lea eax, [ebp - 0x1c]
push eax
movsd qword [ebp - 0x14], xmm0
movsd qword [ebp - 0x1c], xmm0
call fcn.1002419c
add esp, 4
test ax, ax
jg case.0x10059c7d.0
movsd xmm0, qword [ebp - 0x14]
lea esi, [ebx + 8]
sub esp, 8
lea eax, [esi + 0x40]
movsd qword [esp], xmm0
push eax
push esi
call fcn.100573e0
mov edi, dword [ebx]
add esp, 0x10
sub eax, esi
mov edx, dword [edi]
push eax
push esi
mov esi, dword [edx + 4]
jmp 0x1005a463
push 0xb
push str._discarded_
jmp 0x1005a45c
push 4
push str.null
mov edi, dword [ebx]
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x100f4524]
mov ecx, edi
call esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14