Function at 0x1157470
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x40
push ebx
push ebp
mov ebp, dword [esp + 0x4c]
cmp dword [ebp + 8], 2
jne 0x11574bd
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x11574bd
push 3
push ebp
call fcn.01159360
mov ebx, dword [esp + 0x58]
push esi
push ebx
push ebp
call fcn.01158b10
add esp, 0x14
test eax, eax
jne 0x11574b0
mov dword [ebp + 0xc], 0xff
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret
push 2
push ebp
call fcn.01159360
add esp, 8
jmp 0x11574c1
mov ebx, dword [esp + 0x50]
cmp dword [ebp + 8], 3
jne 0x11574ea
push esi
push ebx
push ebp
call fcn.01158b10
add esp, 0xc
test eax, eax
je 0x11574a1
cmp eax, 0xfffffff4
jne 0x1157730
pop ebp
mov eax, 0x80000904
pop ebx
add esp, 0x40
ret
mov eax, dword [ebp + 0xc]
cmp eax, 0xda
push edi
je 0x115755d
cmp eax, 0x10
je 0x1157651
push ebp
mov eax, 1
mov ecx, ebx
mov edi, esi
call fcn.01156d60
add esp, 4
test eax, eax
jne 0x1157536
cmp byte [esi + 0xf], 2
je 0x1157526
pop edi
pop ebp
mov eax, 0x80001004
pop ebx
add esp, 0x40
ret
pop edi
mov dword [ebp + 0xc], 0xcd
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret
xor eax, eax
mov ecx, 0x10
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
lea eax, [esp + 0xc]
push eax
push ebp
call fcn.01156ba0
mov al, byte [esp + 0x20]
add esp, 8
cmp al, 0x20
jne 0x11576e9
lea ecx, [ebx + 1]
push ebp
mov eax, 2
mov edi, esi
call fcn.01156ce0
add esp, 4
test eax, eax
jne 0x115762a
mov cl, 0xff
lea ebx, [ebx]
cmp byte [eax + esi], 0
jne 0x11575ca
cmp byte [eax + esi + 1], cl
jne 0x11575ca
cmp byte [eax + esi + 2], cl
jne 0x11575ca
cmp byte [eax + esi + 3], cl
jne 0x11575ca
cmp byte [eax + esi + 4], cl
jne 0x11575ca
cmp byte [eax + esi + 5], cl
jne 0x11575ca
cmp byte [eax + esi + 6], cl
jne 0x11575ca
cmp byte [eax + esi + 7], cl
jne 0x11575ca
cmp byte [eax + esi + 8], cl
jne 0x11575ca
cmp byte [eax + esi + 9], cl
jne 0x11575ca
cmp byte [eax + esi + 0xa], cl
jne 0x11575ca
mov dl, byte [eax + esi + 0xb]
test dl, dl
je 0x11575e5
inc eax
cmp eax, 0x930
jl 0x1157580
pop edi
mov dword [ebp + 0xc], 0
pop ebp
mov eax, 0x80000900
pop ebx
add esp, 0x40
ret
push 0x930
add eax, esi
push eax
push esi
call fcn.0115be10
lea eax, [esi + 0xc]
mov ecx, 0x1422f80
add esp, 0xc
sub ecx, eax
mov edx, 0x249
mov edi, dword [ecx + eax]
xor dword [eax], edi
add eax, 4
dec edx
jne 0x1157605
cmp byte [esi + 0xf], 2
jne 0x115751a
pop edi
mov dword [ebp + 0xc], 0xda
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret
xor eax, eax
mov ecx, 0x10
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
cmp eax, 1
jne 0x11576c4
lea ecx, [esp + 0xc]
push ecx
push ebp
call fcn.01159b90
add esp, 8
lea ecx, [esp + 0x50]
push ecx
mov ecx, ebp
mov dword [esp + 0x54], 0
call fcn.01156e30
add esp, 4
test eax, eax
jne 0x1157723
mov ebx, dword [esp + 0x50]
test ebx, ebx
jle 0x1157723
push 0x930
push ebp
call fcn.01156ea0
add esp, 8
test eax, eax
jne 0x1157723
mov eax, dword [esp + 0x54]
push ebp
mov ecx, 1
mov edi, esi
call fcn.01156c70
add esp, 4
test eax, eax
push ebx
push ebp
jne 0x115771b
call fcn.01156ea0
add esp, 8
pop edi
mov dword [ebp + 0xc], 0x10
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret
cmp eax, 2
jne 0x11576d9
lea edx, [esp + 0xc]
push edx
push ebp
call fcn.01159460
jmp 0x115764e
lea eax, [esp + 0xc]
push eax
push ebp
call fcn.011584f0
jmp 0x115764e
cmp al, 0x11
jne 0x1157700
pop edi
mov dword [ebp + 0xc], 0
pop ebp
mov eax, 0x80000901
pop ebx
add esp, 0x40
ret
cmp al, 2
jne 0x1157651
pop edi
mov dword [ebp + 0xc], 0
pop ebp
mov eax, 0x80000902
pop ebx
add esp, 0x40
ret
call fcn.01156ea0
add esp, 8
mov eax, 0x80000903
mov dword [ebp + 0xc], 0
pop edi
pop ebp
pop ebx
add esp, 0x40
ret