Function at 0x43f300
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x30
push ebx
push ebp
push esi
xor ebp, ebp
push edi
push ebp
lea eax, [esp + 0x34]
push ebp
lea ecx, [esp + 0x1c]
mov edi, dword [esp + 0x50]
push eax
lea edx, [esp + 0x24]
push ecx
lea eax, [esp + 0x38]
push edx
lea ecx, [esp + 0x38]
push eax
lea edx, [esp + 0x28]
push ecx
lea eax, [esp + 0x38]
push edx
lea ecx, [esp + 0x54]
push eax
lea edx, [esp + 0x70]
push ecx
push edx
push edi
mov dword [esp + 0x48], ebp
mov dword [esp + 0x44], ebp
mov dword [esp + 0x60], ebp
call fcn.0043ee00
add esp, 0x30
test al, al
jne 0x43f35f
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x30
ret
mov eax, dword [esp + 0x18]
push ebp
push eax
push edi
call fcn.004393c2
mov ecx, dword [esp + 0x30]
add esp, 0xc
cmp dword [ecx + 0x4874], ebp
jne 0x43f38f
mov edx, dword [esp + 0x14]
push ebp
push edx
push edi
call fcn.0043ecc0
add esp, 0xc
mov dword [esp + 0x10], eax
jmp 0x43f393
mov eax, dword [esp + 0x10]
cmp eax, ebp
jne 0x43f3ab
pop edi
pop esi
pop ebp
mov dword [0x499888], 0xa
xor eax, eax
pop ebx
add esp, 0x30
ret
mov ecx, dword [esp + 0x4c]
test cl, 0x10
je 0x43f3b6
sar eax, 1
mov edx, ecx
and edx, 0x40
je 0x43f3bf
sar eax, 1
test ch, 0x10
je 0x43f3d2
cmp edx, ebp
je 0x43f3d2
or ecx, 0x40000
mov dword [esp + 0x4c], ecx
test ecx, 0x40000
je 0x43f3e6
test cl, 0x40
je 0x43f3e6
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.00436c51
mov esi, eax
cmp esi, ebp
jne 0x43f424
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 ebp
push esi
call fcn.004372cf
mov edx, dword [esp + 0x24]
push 0x242
mov dword [esi + 0x155], edx
mov eax, dword [esp + 0x20]
add eax, 0x3e8
push str.E:devcgames_fmod351_src_format_mpeg.c
push eax
push ebp
call fcn.00438f10
mov ebx, eax
add esp, 0x10
cmp ebx, ebp
mov dword [esp + 0x2c], ebx
jne 0x43f47e
push esi
mov dword [0x499888], 0xc
call fcn.00436d12
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x30
ret
mov ecx, dword [esp + 0x18]
push ebp
push ecx
push edi
call fcn.004393c2
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 ebp
push esi
xor edi, edi
call fcn.00437194
mov ecx, dword [esp + 0x48]
mov edx, dword [esp + 0x1c]
push ecx
push edx
push ebx
call fcn.0043926f
add esp, 0xc
jmp 0x43f4c8
mov ebx, dword [esp + 0x2c]
mov ecx, dword [esi + 0x155]
lea eax, [esp + 0x28]
push eax
add ebx, ebp
push 0
push 0
push ebx
push ecx
mov byte [esp + 0x5c], 0
call fcn.0043c070
add esp, 0x14
test eax, eax
je 0x43f51a
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 0x155]
lea edx, [esp + 0x14]
add eax, edi
push edx
push eax
push ebx
push ecx
call fcn.0043c270
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x38]
add esp, 0x10
add edi, eax
lea ebp, [edx + ebp + 4]
mov al, 1
jmp 0x43f51e
mov al, byte [esp + 0x48]
mov ecx, dword [esp + 0x10]
add ecx, 0xfffff000
cmp edi, ecx
jge 0x43f536
cmp ebp, dword [esp + 0x1c]
jge 0x43f536
test al, al
jne 0x43f4c4
test byte [esp + 0x4c], 8
je 0x43f55c
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x20]
xor ecx, ecx
test edx, edx
jle 0x43f55c
mov dl, byte [eax]
xor dl, 0x80
mov byte [eax], dl
mov edx, dword [esp + 0x44]
inc eax
inc ecx
cmp ecx, edx
jl 0x43f54b
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x3c]
push edx
mov edx, dword [esp + 0x24]
push eax
push ecx
push edx
push esi
call fcn.0043721e
mov cl, byte [esp + 0x4c]
mov eax, dword [esp + 0x10]
test cl, 0x10
je 0x43f585
sar eax, 1
test cl, 0x40
je 0x43f58c
sar eax, 1
dec eax
push eax
push 0
push esi
call fcn.004372cf
mov eax, dword [esp + 0x2c]
push 0x285
push str.E:devcgames_fmod351_src_format_mpeg.c
push eax
push 0
call fcn.00438eb6
push esi
call fcn.0043f2d0
add esp, 0x14
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30
ret