Function at 0x100411cb
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
xor ebx, ebx
push edi
lea eax, [ebp - 0x30]
push ebx
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 0xc]
mov dword [ebp - 0x2c], ebx
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 0x10]
push eax
push edi
mov dword [ebp - 0x30], ebx
call fcn.10040f6e
add esp, 0x2c
test al, al
je 0x10041368
mov eax, dword [ebp - 8]
test byte [ebp + 0x10], 0x10
mov ecx, eax
je 0x10041224
sar eax, 1
mov ecx, eax
mov eax, dword [ebp + 0x10]
and eax, 0x40
je 0x1004122e
sar ecx, 1
test byte [ebp + 0x12], 4
je 0x1004123c
cmp eax, ebx
je 0x1004123c
and byte [ebp + 0x11], 0xef
mov edx, dword [ebp + 0x10]
mov eax, 0xff
and dl, 0x40
push eax
neg dl
sbb edx, edx
and dl, 0x7f
add edx, 0x80
push edx
push eax
push dword [ebp - 0x14]
push dword [ebp + 0x10]
push ecx
push dword [ebp + 8]
call fcn.10036ba9
mov esi, eax
cmp esi, ebx
je 0x10041368
mov eax, dword [esi + 0x10c]
dec eax
push eax
push ebx
push esi
call fcn.100372b2
mov eax, dword [ebp - 0x18]
push ebx
mov dword [esi + 0x15d], eax
push dword [ebp - 0x1c]
push edi
call fcn.1003ff26
add esp, 0xc
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp + 8]
push eax
push dword [ebp - 8]
push ebx
push esi
call fcn.10037156
cmp dword [esi + 0x15d], ebx
jne 0x100412ef
cmp dword [ebp - 0xc], 8
je 0x100412c9
cmp dword [ebp - 0xc], 0x10
je 0x100412c9
test byte [ebp + 0x12], 0x40
je 0x100412ef
test byte [ebp + 0x10], 0x10
push edi
je 0x100412da
mov eax, dword [ebp - 4]
shr eax, 1
push eax
push 2
jmp 0x100412df
push dword [ebp - 4]
push 1
push dword [ebp + 8]
call fcn.1003fd4b
add esp, 0x10
jmp 0x10041382
mov edi, str.C:dev_fmod360src_src_format_wav.c
push 0x2f1
push edi
push dword [ebp - 4]
push ebx
call fcn.1003ebc3
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x1004131e
push esi
mov dword [0x100b1414], 0xc
call fcn.10036c40
jmp 0x10041368
push dword [ebp + 0xc]
push dword [ebp - 4]
push 1
push ebx
call fcn.1003fd4b
push dword [ebp - 0xc]
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
push dword [ebp - 4]
push ebx
push esi
call fcn.10041102
add esp, 0x28
test al, al
jne 0x1004136f
push esi
mov dword [0x100b1414], 0xb
call fcn.10036c40
push 0x2ff
push edi
push ebx
push 0
call fcn.1003eb69
add esp, 0x10
xor eax, eax
jmp 0x100413f9
push 0x303
push edi
push ebx
push 0
call fcn.1003eb69
add esp, 0x10
xor ebx, ebx
test byte [ebp + 0x10], 8
je 0x1004139c
mov eax, dword [ebp + 8]
xor ecx, ecx
cmp dword [ebp - 0x10], ebx
jbe 0x1004139c
xor byte [eax], 0x80
inc eax
inc ecx
cmp ecx, dword [ebp - 0x10]
jb 0x10041392
push dword [ebp - 0x20]
push dword [ebp - 0x10]
push dword [ebp - 0x24]
push dword [ebp + 8]
push esi
call fcn.100371e0
test byte [ebp + 0x10], 0x10
mov eax, dword [ebp - 8]
je 0x100413b9
sar eax, 1
test byte [ebp + 0x10], 0x40
je 0x100413c1
sar eax, 1
cmp dword [ebp - 0x30], ebx
jne 0x100413d6
cmp dword [ebp - 0x2c], ebx
jne 0x100413d6
dec eax
push eax
push ebx
push esi
call fcn.100372b2
jmp 0x100413f0
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
push esi
call fcn.100372b2
test byte [ebp + 0x10], 1
jne 0x100413f0
push 2
push esi
call fcn.10037229
push esi
call fcn.100410eb
pop ecx
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret