Function at 0x40b040
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2f8
mov eax, dword [0x430034]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0x2ec], eax
mov esi, edx
mov eax, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x2f4], eax
mov edi, ecx
mov eax, dword [ebp + 0x10]
push 0x9c
mov dword [ebp - 0x2e8], eax
lea eax, [ebp - 0x2e0]
push 0
push eax
call fcn.0040ffd0
push esi
lea ecx, [ebp - 0x2d8]
call fcn.0040be30
push edi
lea ecx, [ebp - 0x2cc]
call fcn.0040be30
mov esi, dword [ebp - 0x2d4]
add esp, 0x14
mov ebx, dword [ebp - 0x2d0]
dec esi
test esi, esi
jle 0x40b0bf
cmp dword [ebx + esi*4], 0
jne 0x40b0bf
dec esi
test esi, esi
jg 0x40b0b4
mov ebx, dword [ebx + esi*4]
mov edx, 0x1f
lea edi, [edx - 2]
nop word [eax + eax]
mov eax, ebx
mov ecx, edx
shr eax, cl
test al, 1
jne 0x40b10f
lea ecx, [edi + 1]
mov eax, ebx
shr eax, cl
test al, 1
jne 0x40b10e
mov eax, ebx
mov ecx, edi
shr eax, cl
test al, 1
jne 0x40b109
lea ecx, [edi - 1]
mov eax, ebx
shr eax, cl
test al, 1
jne 0x40b104
sub edi, 4
sub edx, 4
jns 0x40b0d0
jmp 0x40b10f
sub edx, 3
jmp 0x40b10f
sub edx, 2
jmp 0x40b10f
dec edx
mov ebx, dword [ebp - 0x2ec]
lea edi, [edx + 8]
shl esi, 5
mov edx, 0x42c640
add edi, esi
push 0
push ecx
sar edi, 3
mov ecx, ebx
mov dword [ebp - 0x2dc], edi
call fcn.004099e0
add esp, 8
mov dword [ebp - 0x2f0], eax
test eax, eax
jle 0x40b34f
lea ecx, [eax + 1]
push ecx
call fcn.00414236
mov esi, eax
add esp, 4
test esi, esi
je 0x40b34f
mov ecx, dword [ebp - 0x2f0]
push ecx
push ebx
push esi
call fcn.00410130
mov eax, dword [ebp - 0x2f0]
lea ecx, [ebp - 0x2ec]
push ecx
push eax
mov edx, esi
mov dword [ebp - 0x2ec], 0
mov byte [esi + eax], 0
call fcn.0040b510
add esp, 0x14
mov esi, eax
cmp dword [ebp - 0x2ec], 0
mov dword [ebp - 0x2f8], esi
je 0x40b34f
push 0x40
lea eax, [ebp - 0x44]
push 0
push eax
call fcn.0040ffd0
lea eax, [edi - 0x10]
add esp, 0xc
cmp eax, 0x1f0
ja 0x40b255
lea eax, [ebp - 0x244]
mov edx, esi
push eax
lea ecx, [ebp - 0x2e0]
call fcn.0040dd90
mov esi, eax
add esp, 4
test esi, esi
jne 0x40b25a
cmp dword [ebp - 0x254], eax
je 0x40b1ef
mov esi, 0xfffffbf0
jmp 0x40b25a
cmp byte [ebp - 0x244], 0
jne 0x40b1e8
cmp byte [ebp - 0x243], 2
lea eax, [ebp - 0x242]
jne 0x40b1e8
cmp byte [ebp - 0x242], 0
je 0x40b221
lea ecx, [ebp + edi - 0x245]
cmp eax, ecx
jae 0x40b1e8
inc eax
cmp byte [eax], 0
jne 0x40b217
inc eax
lea ecx, [ebp - 0x244]
sub edi, eax
add ecx, edi
mov edi, dword [ebp - 0x2e8]
cmp ecx, 0x100000
jle 0x40b241
mov esi, 0xfffffb90
jmp 0x40b260
push ecx
push eax
lea eax, [ebp - 0x44]
mov dword [edi], ecx
push eax
call fcn.00410130
add esp, 0xc
xor esi, esi
jmp 0x40b260
mov esi, 0xfffffc00
mov edi, dword [ebp - 0x2e8]
mov eax, dword [ebp - 0x2f8]
test eax, eax
je 0x40b273
push eax
call fcn.0041421b
add esp, 4
test esi, esi
jne 0x40b34f
xor eax, eax
test ebx, ebx
je 0x40b28c
cmp byte [ebx], al
je 0x40b28c
inc eax
cmp byte [ebx + eax], 0
jne 0x40b285
mov ecx, dword [ebp - 0x2f0]
sub eax, ecx
dec eax
push edi
push eax
lea edx, [ecx + 1]
add edx, ebx
call fcn.0040b510
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x40b34f
mov ecx, dword [edi]
inc ecx
mov byte [ebp - 0x2e1], 0
push ecx
call fcn.00414236
mov ecx, dword [ebp - 0x2f4]
add esp, 4
mov dword [ecx], eax
test eax, eax
je 0x40b32d
mov ecx, dword [edi]
test ecx, ecx
jne 0x40b2de
cmp byte [ebx], cl
je 0x40b2de
inc ecx
cmp byte [ecx + ebx], 0
jne 0x40b2d7
xor esi, esi
cmp byte [ebp - 0x44], 0
je 0x40b2ee
inc esi
cmp byte [ebp + esi - 0x44], 0
jne 0x40b2e6
xor edi, edi
test ecx, ecx
jle 0x40b305
mov eax, edi
cdq
idiv esi
mov al, byte [ebp + edx - 0x44]
xor byte [edi + ebx], al
inc edi
cmp edi, ecx
jl 0x40b2f4
mov esi, dword [ebp - 0x2e8]
mov edi, dword [ebp - 0x2f4]
push dword [esi]
push ebx
push dword [edi]
call fcn.00410130
mov ecx, dword [esi]
add esp, 0xc
mov eax, dword [edi]
mov byte [ebp - 0x2e1], 1
mov byte [ecx + eax], 0
push ebx
call fcn.0041421b
mov al, byte [ebp - 0x2e1]
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040e688
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp - 4]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040e688
mov esp, ebp
pop ebp
ret 0xc