Function at 0x1003e310
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x30
push ebx
push ebp
push esi
push edi
xor edi, edi
lea eax, [esp + 0x30]
push edi
mov ebp, dword [esp + 0x4c]
push edi
lea ecx, [esp + 0x20]
push eax
lea edx, [esp + 0x34]
push ecx
lea eax, [esp + 0x34]
push edx
lea ecx, [esp + 0x24]
push eax
lea edx, [esp + 0x34]
push ecx
lea eax, [esp + 0x50]
push edx
lea ecx, [esp + 0x6c]
push eax
push ecx
push ebp
mov dword [esp + 0x5c], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x40], edi
call fcn.1003de00
add esp, 0x2c
test al, al
jne 0x1003e36a
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x30
ret
mov al, byte [esp + 0x4c]
mov dword [esp + 0x48], 0x900
test al, 0x40
je 0x1003e382
mov dword [esp + 0x48], 0x1200
mov edx, dword [esp + 0x18]
push edi
push edx
push ebp
call fcn.1003ff26
mov eax, dword [esp + 0x30]
add esp, 0xc
cmp dword [eax + 0x4874], edi
jne 0x1003e3b2
mov ecx, dword [esp + 0x48]
push edi
push ecx
push ebp
call fcn.1003dc70
add esp, 0xc
mov dword [esp + 0x10], eax
jmp 0x1003e3b6
mov eax, dword [esp + 0x10]
cmp eax, edi
jne 0x1003e3ce
pop edi
pop esi
pop ebp
mov dword [0x100b1414], 0xa
xor eax, eax
pop ebx
add esp, 0x30
ret
mov ecx, dword [esp + 0x4c]
test cl, 0x10
je 0x1003e3d9
sar eax, 1
mov edx, ecx
and edx, 0x40
je 0x1003e3e2
sar eax, 1
test ch, 0x10
je 0x1003e3f5
cmp edx, edi
je 0x1003e3f5
or ecx, 0x40000
mov dword [esp + 0x4c], ecx
test ecx, 0x40000
je 0x1003e409
test cl, 0x40
je 0x1003e409
and ch, 0xef
mov dword [esp + 0x4c], ecx
mov edx, ecx
push 0xff
and dl, 0x40
neg dl
sbb edx, edx
and dl, 0x7f
add edx, 0x80
push edx
mov edx, dword [esp + 0x3c]
push 0xff
push edx
push ecx
push eax
mov eax, dword [esp + 0x5c]
push eax
call fcn.10036ba9
mov esi, eax
cmp esi, edi
jne 0x1003e447
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x30
ret
mov ecx, dword [esi + 0x10c]
dec ecx
push ecx
push edi
push esi
call fcn.100372b2
mov edx, dword [esp + 0x24]
push 0x275
mov dword [esi + 0x15d], edx
mov eax, dword [esp + 0x20]
add eax, 0x3e8
push str.C:dev_fmod360src_src_format_mpeg.c
push eax
push edi
call fcn.1003ebc3
mov ebx, eax
add esp, 0x10
cmp ebx, edi
mov dword [esp + 0x2c], ebx
jne 0x1003e4a1
push esi
mov dword [0x100b1414], 0xc
call fcn.10036c40
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x30
ret
mov ecx, dword [esp + 0x18]
push edi
push ecx
push ebp
call fcn.1003ff26
add esp, 0xc
lea edx, [esp + 0x38]
lea eax, [esp + 0x44]
lea ecx, [esp + 0x3c]
push edx
push eax
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x28]
push ecx
push edx
push eax
push 0
push esi
call fcn.10037156
mov ecx, dword [esp + 0x1c]
push ebp
push ecx
push 1
push ebx
call fcn.1003fd4b
add esp, 0x10
jmp 0x1003e4e8
mov ebx, dword [esp + 0x2c]
mov eax, dword [esi + 0x15d]
lea edx, [esp + 0x28]
xor ebp, ebp
push edx
add ebx, edi
push ebp
push ebp
push ebx
push eax
call fcn.10049a80
test eax, eax
je 0x1003e538
mov edx, dword [esp + 0x20]
mov ebp, dword [esp + 0x14]
mov eax, dword [esi + 0x15d]
lea ecx, [esp + 0x48]
add edx, ebp
push ecx
push edx
push ebx
push eax
call fcn.10049d00
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x28]
add ebp, eax
mov dword [esp + 0x14], ebp
lea edi, [edi + ecx + 4]
mov ebp, 1
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0x14]
add edx, 0xfffff000
cmp ebx, edx
jae 0x1003e554
cmp edi, dword [esp + 0x1c]
jae 0x1003e554
test ebp, ebp
jne 0x1003e4e4
test byte [esp + 0x4c], 8
je 0x1003e57a
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x20]
xor ecx, ecx
test edx, edx
jbe 0x1003e57a
mov dl, byte [eax]
xor dl, 0x80
mov byte [eax], dl
mov edx, dword [esp + 0x44]
inc eax
inc ecx
cmp ecx, edx
jb 0x1003e569
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x3c]
push eax
mov eax, dword [esp + 0x24]
push ecx
push edx
push eax
push esi
call fcn.100371e0
mov cl, byte [esp + 0x4c]
mov eax, ebx
test cl, 0x10
je 0x1003e5a3
sar ebx, 1
mov eax, ebx
test cl, 0x40
je 0x1003e5aa
sar eax, 1
dec eax
push eax
push 0
push esi
call fcn.100372b2
mov ecx, dword [esp + 0x2c]
push 0x2b6
push str.C:dev_fmod360src_src_format_mpeg.c
push ecx
push 0
call fcn.1003eb69
mov edx, dword [esi + 0x15d]
add esp, 0x10
push edx
call fcn.1003dde0
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret