Function at 0x409602
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
and byte [ebp - 1], 0
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
push esi
push edi
mov dword [ebp - 8], ebx
jne 0x409624
mov eax, 0x444fe0
push 0x43e254
push eax
call fcn.004292ba
mov esi, eax
pop ecx
cmp esi, ebx
pop ecx
mov dword [ebp - 0x10], esi
je 0x409803
lea eax, [ebp - 8]
push eax
push 0x43ea7c
push 0x43e270
call fcn.00429940
add esp, 0xc
cmp dword [ebp + 8], ebx
je 0x4096f5
mov eax, dword [ebp - 8]
cmp eax, ebx
lea edi, [eax + eax]
jne 0x40966c
mov edi, 0xf4240
push edi
call fcn.0042895d
push esi
mov ebx, eax
push edi
push 1
push ebx
call fcn.0042a4b7
add esp, 0x14
cmp eax, edi
jne 0x4096e9
xor esi, esi
test edi, edi
jle 0x4096bf
push 8
lea eax, [esi + ebx]
push str.GEBATAD_00307200
push eax
call fcn.0042a690
add esp, 0xc
test eax, eax
je 0x4096a9
inc esi
cmp esi, edi
jl 0x40968b
jmp 0x4096bf
lea eax, [ebp - 8]
push eax
lea eax, [esi + ebx + 8]
push 0x43ea7c
push eax
call fcn.00429940
add esp, 0xc
cmp esi, edi
jne 0x4096e9
push dword [ebp - 0x10]
call fcn.004290d3
mov dword [esp], 0x43e254
push 0x444fe0
call fcn.004292ba
pop ecx
mov dword [ebp - 0x10], eax
test eax, eax
pop ecx
je 0x409803
push ebx
call fcn.00428730
mov esi, dword [ebp - 0x10]
pop ecx
xor ebx, ebx
cmp dword [ebp - 8], ebx
jne 0x409705
push esi
call fcn.004290d3
jmp 0x409802
push ebx
push dword [ebp - 8]
push esi
call fcn.0042a5ce
add esp, 0xc
test eax, eax
jne 0x4096fa
push esi
push 1
lea eax, [ebp - 0xc]
push 4
push eax
mov dword [ebp - 0xc], ebx
call fcn.0042a4b7
add esp, 0x10
cmp eax, 1
jne 0x4096fa
mov eax, dword [ebp - 0xc]
cmp eax, ebx
jl 0x4096fa
shl eax, 2
push eax
call fcn.0042895d
mov edi, eax
pop ecx
cmp edi, ebx
mov dword [ebp + 8], edi
push esi
je 0x4096fb
push dword [ebp - 0xc]
push 4
push edi
call fcn.0042a4b7
add esp, 0x10
cmp eax, dword [ebp - 0xc]
je 0x409761
mov byte [ebp - 1], 1
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
imul eax, eax, 0x108
cmp dword [ebp - 0xc], 0
lea eax, [ecx + eax + 4]
mov dword [ebp - 8], eax
jle 0x4097ec
mov esi, 0x104
push dword [ebp - 0x10]
lea eax, [ebp - 0x114]
push 1
push esi
push eax
call fcn.0042a4b7
add esp, 0x10
cmp eax, 1
jne 0x4097e8
xor eax, eax
xor byte [ebp + eax - 0x114], 0x55
inc eax
cmp eax, esi
jl 0x40979b
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0x2e
jne 0x4097c3
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.0042a100
pop ecx
test eax, eax
pop ecx
jne 0x4097ec
lea eax, [ebp - 0x114]
push eax
push dword [ebp + 0xc]
call fcn.00429f30
pop ecx
test eax, eax
pop ecx
je 0x4097ec
mov eax, dword [edi]
add edi, 4
add dword [ebp - 8], eax
inc ebx
cmp ebx, dword [ebp - 0xc]
jl 0x40977f
jmp 0x4097ec
mov byte [ebp - 1], 1
cmp ebx, dword [ebp - 0xc]
jne 0x409807
push dword [ebp + 8]
call fcn.00428730
push dword [ebp - 0x10]
call fcn.004290d3
pop ecx
pop ecx
xor eax, eax
jmp 0x409866
push 0
push dword [ebp - 8]
push dword [ebp - 0x10]
call fcn.0042a5ce
add esp, 0xc
test eax, eax
je 0x40981f
mov byte [ebp - 1], 1
mov esi, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov eax, dword [esi + ebx*4]
add eax, dword [ebp - 8]
cmp dword [ebp + 0x14], 0
mov dword [ecx], eax
je 0x409844
lea eax, [ebp - 0x114]
push eax
push dword [ebp + 0x14]
call fcn.00429850
pop ecx
pop ecx
mov bl, byte [ebp - 1]
test bl, bl
je 0x409854
push dword [ebp - 0x10]
call fcn.004290d3
pop ecx
push esi
call fcn.00428730
neg bl
sbb ebx, ebx
pop ecx
not ebx
and ebx, dword [ebp - 0x10]
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret 0x10