Function at 0x1005cd54
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x9c
mov dword [esp + 8], ebp
mov ebp, eax
mov dword [esp + 0xc], esi
mov esi, dword [esp + 0xa0]
mov dword [esp + 4], ebx
mov ebx, dword [esp + 0xa4]
mov dword [esp + 0x10], edi
movzx ecx, byte [ebp + 0x14]
cmp cl, 0x73
jne 0x1005cf2e
call fcn.1001c07c
xor al, 1
je 0x1005ce89
mov dword [esp + 0xa4], ebx
lea edx, [esp + 0x14]
mov eax, esi
push edx
call fcn.100444a8
mov ebx, eax
mov ecx, 0x11
add ebx, 0x40
push dword [ebx]
sub ebx, 4
loop 0x1005cdb1
call fcn.100601cc
mov edi, eax
cmp dword [ebp + 4], 0x7ffffffe
je 0x1005cdde
cmp dword [ebp + 4], edi
jae 0x1005cdde
mov ebx, dword [esp + 0xa4]
mov edi, dword [ebp + 4]
mov dword [esp + 0xa4], ebx
mov ecx, dword [ebp]
cmp edi, ecx
jae 0x1005ce0f
mov dword [esp + 0x94], edi
xor ebx, ebx
mov edi, ecx
sub edi, dword [esp + 0x94]
je 0x1005ce0f
push dword [esp + 0xa4]
mov eax, 0x20
call fcn.1000c06c
inc ebx
cmp ebx, edi
jb 0x1005cdf9
cmp dword [ebp + 4], 0x7ffffffe
jne 0x1005ce3a
push dword [esp + 0xa4]
mov ebx, esi
mov ecx, 0x11
add ebx, 0x40
push dword [ebx]
sub ebx, 4
loop 0x1005ce29
call fcn.100601fc
jmp 0x1005d09d
mov ebx, dword [esp + 0xa4]
xor edi, edi
mov eax, esi
call fcn.10044264
xor al, 1
je 0x1005d09d
cmp dword [ebp + 4], edi
je 0x1005d09d
push ebx
mov eax, esi
call fcn.1004426c
call fcn.1000c06c
mov eax, esi
call fcn.10044274
inc edi
mov eax, esi
call fcn.10044264
xor al, 1
je 0x1005d09d
cmp edi, dword [ebp + 4]
jb 0x1005ce5b
jmp 0x1005d09d
cmp dword [ebp + 4], 0x7ffffffe
jne 0x1005cec1
xor edi, edi
mov eax, esi
call fcn.10044264
xor al, 1
je 0x1005cef8
push ebx
mov eax, esi
call fcn.1004426c
call fcn.1000c06c
mov eax, esi
call fcn.10044274
inc edi
mov eax, esi
call fcn.10044264
xor al, 1
jne 0x1005ce9f
jmp 0x1005cef8
xor edi, edi
mov eax, esi
call fcn.10044264
xor al, 1
je 0x1005cef8
cmp dword [ebp + 4], edi
je 0x1005cef8
push ebx
mov eax, esi
call fcn.1004426c
call fcn.1000c06c
mov eax, esi
call fcn.10044274
inc edi
mov eax, esi
call fcn.10044264
xor al, 1
je 0x1005cef8
cmp edi, dword [ebp + 4]
jb 0x1005ced3
mov ecx, dword [ebp]
cmp edi, ecx
jae 0x1005d09d
xor esi, esi
sub ecx, edi
mov dword [esp + 0x98], ecx
je 0x1005d09d
push ebx
mov eax, 0x20
call fcn.1000c06c
inc esi
cmp esi, dword [esp + 0x98]
jb 0x1005cf14
jmp 0x1005d09d
cmp cl, 0x72
jne 0x1005cf69
mov eax, esi
call fcn.10044264
xor al, 1
je 0x1005d09d
push ebx
mov eax, esi
call fcn.1004426c
push eax
mov eax, ebp
call fcn.1000c780
mov eax, esi
call fcn.10044274
mov eax, esi
call fcn.10044264
xor al, 1
jne 0x1005cf42
jmp 0x1005d09d
cmp cl, 0x28
jne 0x1005d05a
mov eax, esi
call fcn.10044264
test al, al
jne 0x1005d09d
mov dword [esp + 0xa0], esi
mov esi, 0x10070c10
lea edi, [esp + 0x64]
mov ecx, 0xc
rep movsd dword es:[edi], dword [esi]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
lea eax, [esp + 0x6c]
call fcn.1001c138
push ebx
lea eax, [esp + 0x68]
call fcn.1000aeb4
mov eax, ebp
call fcn.1001c07c
test al, al
je 0x1005cfd7
mov esi, dword [esp + 0xa0]
mov eax, esi
push ebx
call fcn.1004426c
push eax
lea eax, [esp + 0x6c]
call fcn.1000c780
jmp 0x1005cff0
mov esi, dword [esp + 0xa0]
mov eax, esi
push ebx
call fcn.1004426c
push eax
lea eax, [esp + 0x6c]
call fcn.10060210
mov ecx, dword [ebp + 0x24]
or ecx, dword [ebp + 0x20]
je 0x1005d02f
push ebx
push dword [esp + 0x94]
push dword [esp + 0x94]
call fcn.1000b064
mov eax, esi
call fcn.10044274
mov eax, esi
call fcn.10044264
test al, al
jne 0x1005d09d
push ebx
push dword [ebp + 0x24]
push dword [ebp + 0x20]
call fcn.1000b064
jmp 0x1005cf81
mov eax, esi
call fcn.10044274
mov eax, esi
call fcn.10044264
test al, al
jne 0x1005d09d
push ebx
push dword [esp + 0x94]
push dword [esp + 0x94]
call fcn.1000b064
jmp 0x1005cf81
mov dword [esp], 0x10070d60
call fcn.1001e334
mov ebx, eax
mov eax, 0x1000d1e8
push eax
push 0x27
movzx eax, byte [ebp + 0x14]
call fcn.1000e804
mov esi, 0xc
push edx
mov edx, 0x1001bf8c
push eax
mov eax, ebx
push edx
push esi
push 0xbcb
push 0
call fcn.1001d7f0
mov dword [esp], eax
call fcn.10019b14
mov ebx, dword [esp + 4]
mov ebp, dword [esp + 8]
mov esi, dword [esp + 0xc]
mov edi, dword [esp + 0x10]
add esp, 0x9c
ret 8