Function at 0x401b82
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14c
cmp dword [ebp + 0xc], 0x100
push ebx
push esi
push edi
jbe 0x401ba5
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x400]
mov dword [ebp - 0x2c], ecx
jmp 0x401bac
mov dword [ebp - 0x2c], 0x10
push 0x44
lea eax, [ebp - 0x84]
push 0
push eax
call fcn.0040ebb0
add esp, 0xc
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov edx, dword [eax]
add eax, 4
inc dword [ebp + edx*4 - 0x84]
dec ecx
jne 0x401bc5
mov eax, dword [ebp + 0xc]
cmp dword [ebp - 0x84], eax
jne 0x401bf0
xor ecx, ecx
mov edx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x20]
mov dword [edx], ecx
mov dword [eax], ecx
jmp 0x401fe6
mov ecx, 1
lea eax, [ebp - 0x80]
cmp dword [eax], 0
jne 0x401c08
add eax, 4
inc ecx
lea edx, [ebp - 0x44]
cmp eax, edx
jbe 0x401bf8
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0xc], ecx
mov edx, ecx
cmp dword [eax], ecx
jae 0x401c16
mov dword [eax], edx
mov esi, 0x10
lea eax, [ebp - 0x44]
cmp dword [eax], 0
jne 0x401c31
sub eax, 4
dec esi
lea edi, [ebp - 0x84]
cmp eax, edi
jne 0x401c1e
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x1c], esi
cmp dword [eax], esi
jbe 0x401c3d
mov dword [eax], esi
mov eax, 1
shl eax, cl
mov dword [ebp - 0x18], eax
cmp esi, ecx
jbe 0x401c69
lea eax, [ebp + ecx*4 - 0x84]
mov edi, dword [eax]
sub dword [ebp - 0x18], edi
js 0x401c81
add eax, 4
inc ecx
mov edi, dword [ebp - 0x18]
add edi, edi
cmp esi, ecx
mov dword [ebp - 0x18], edi
ja 0x401c52
lea ecx, [ebp + esi*4 - 0x84]
mov eax, dword [ecx]
sub dword [ebp - 0x18], eax
jns 0x401c8b
mov eax, 2
jmp 0x401fe8
mov eax, 2
jmp 0x401fe8
add eax, dword [ebp - 0x18]
xor edi, edi
dec esi
mov dword [ecx], eax
lea eax, [ebp - 0x80]
lea ecx, [ebp - 0x104]
mov dword [ebp - 0x108], edi
je 0x401cb1
add edi, dword [eax]
add eax, 4
mov dword [ecx], edi
add ecx, 4
dec esi
jne 0x401ca4
mov esi, dword [ebp + 8]
xor edi, edi
mov eax, dword [esi]
add esi, 4
test eax, eax
je 0x401cd2
lea ecx, [ebp + eax*4 - 0x10c]
mov eax, dword [ecx]
inc eax
mov dword [ecx], eax
mov dword [eax*4 + 0x4174f4], edi
inc edi
cmp edi, dword [ebp + 0xc]
jb 0x401cb6
xor edi, edi
xor ebx, ebx
mov dword [ebp - 8], edi
mov dword [ebp - 0x10c], edi
mov dword [ebp - 0xc8], edi
mov dword [ebp - 0x14c], edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x28], 0x4174f8
mov dword [ebp - 0x20], 0xffffffff
cmp dword [ebp - 0x1c], edx
jl 0x401fad
mov eax, dword [ebp - 0xc]
lea ecx, [ebp + eax*4 - 0x84]
mov dword [ebp - 0x40], ecx
mov eax, dword [ecx]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
dec dword [ebp - 0x30]
test eax, eax
je 0x401f9e
mov esi, dword [ebp - 0x20]
shl esi, 2
mov eax, dword [ebp + esi - 0xc4]
add eax, ebx
cmp eax, dword [ebp - 0xc]
jge 0x401e79
mov eax, dword [ebp - 0x30]
inc eax
mov dword [ebp - 0x38], eax
add ebx, dword [ebp + esi - 0xc4]
add esi, 4
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp + 0x20]
sub edx, ebx
inc dword [ebp - 0x20]
mov eax, dword [eax]
cmp edx, eax
jbe 0x401d6a
mov edx, eax
mov eax, dword [ebp - 0xc]
sub eax, ebx
mov dword [ebp - 4], eax
mov eax, 1
mov cl, byte [ebp - 4]
shl eax, cl
cmp eax, dword [ebp - 0x38]
jbe 0x401da5
mov ecx, dword [ebp - 0x30]
inc dword [ebp - 4]
inc ecx
sub eax, ecx
mov ecx, dword [ebp - 0x40]
cmp edx, dword [ebp - 4]
jbe 0x401da5
add eax, eax
add ecx, 4
cmp eax, dword [ecx]
jbe 0x401da5
sub eax, dword [ecx]
inc dword [ebp - 4]
cmp edx, dword [ebp - 4]
ja 0x401d92
mov eax, dword [ebp - 4]
add eax, ebx
cmp eax, dword [ebp - 0x2c]
jbe 0x401dbc
cmp dword [ebp - 0x2c], ebx
jbe 0x401dbc
mov eax, dword [ebp - 0x2c]
sub eax, ebx
mov dword [ebp - 4], eax
mov eax, 1
mov cl, byte [ebp - 4]
shl eax, cl
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x24], eax
lea edx, [eax*8 + 8]
mov dword [ebp + esi - 0xc4], ecx
push edx
call fcn.0040eb30
add esp, 4
test eax, eax
je 0x401fcb
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp + 0x1c]
inc ecx
add eax, 4
add dword [0x430608], ecx
mov dword [ebp + 0x1c], eax
lea ecx, [eax + 4]
test esi, esi
mov dword [edx], ecx
mov dword [ebp - 0x3c], ecx
mov dword [eax], 0
mov dword [ebp + esi - 0x14c], ecx
je 0x401e67
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], ecx
mov cl, bl
mov dword [ebp + esi - 0x10c], eax
mov dl, byte [ebp + esi - 0xc8]
mov al, byte [ebp - 4]
add al, 0x10
mov byte [ebp - 0x13], dl
mov byte [ebp - 0x14], al
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov dword [ebp - 4], edx
mov edx, 1
shl edx, cl
dec edx
sub cl, byte [ebp + esi - 0xc8]
and edx, dword [ebp - 8]
shr edx, cl
shl edx, 3
mov ecx, dword [ebp - 4]
add edx, dword [ebp + esi - 0x150]
mov dword [edx], eax
mov dword [edx + 4], ecx
mov eax, dword [ebp + esi - 0xc4]
add eax, ebx
cmp eax, dword [ebp - 0xc]
jl 0x401d4d
mov cl, byte [ebp - 0xc]
mov eax, dword [ebp + 0xc]
sub cl, bl
lea edx, [eax*4 + 0x4174f8]
mov byte [ebp - 0x13], cl
cmp edx, dword [ebp - 0x28]
ja 0x401e96
mov byte [ebp - 0x14], 0x63
jmp 0x401ef4
mov eax, dword [ebp - 0x28]
mov edx, dword [eax]
cmp edx, dword [ebp + 0x10]
jae 0x401eba
mov word [ebp - 0x10], dx
cmp edx, 0x100
mov byte [ebp - 4], 0x10
adc byte [ebp - 4], 0xff
mov al, byte [ebp - 4]
mov byte [ebp - 0x14], al
jmp 0x401ef0
cmp byte [ebp + 0x24], 0
je 0x401ec6
mov byte [ebp - 0x14], 0
jmp 0x401ed4
mov esi, edx
mov eax, dword [ebp + 0x18]
sub esi, dword [ebp + 0x10]
mov al, byte [eax + esi*2]
mov byte [ebp - 0x14], al
cmp byte [ebp + 0x24], 0
je 0x401ee2
mov word [ebp - 0x10], 0
jmp 0x401ef4
sub edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x14]
mov ax, word [eax + edx*2]
mov word [ebp - 0x10], ax
add dword [ebp - 0x28], 4
mov eax, 1
mov edx, dword [ebp - 8]
shl eax, cl
mov cl, bl
mov dword [ebp - 4], eax
shr edx, cl
cmp dword [ebp - 0x24], edx
jbe 0x401f38
mov eax, dword [ebp - 0x3c]
lea ecx, [eax + edx*8]
mov eax, dword [ebp - 4]
shl eax, 3
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x38], eax
mov esi, dword [ebp - 0x34]
add edx, dword [ebp - 4]
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x10]
mov dword [esi], eax
mov eax, dword [ebp - 0x38]
mov dword [esi + 4], ecx
add dword [ebp - 0x34], eax
cmp dword [ebp - 0x24], edx
ja 0x401f1c
mov eax, 1
mov cl, byte [ebp - 0xc]
dec cl
shl eax, cl
test dword [ebp - 8], eax
je 0x401f53
xor dword [ebp - 8], eax
shr eax, 1
test dword [ebp - 8], eax
jne 0x401f49
mov edx, dword [ebp - 0x20]
mov cl, bl
shl edx, 2
xor dword [ebp - 8], eax
mov eax, 1
shl eax, cl
dec eax
and eax, dword [ebp - 8]
cmp eax, dword [ebp + edx - 0x10c]
je 0x401d20
sub ebx, dword [ebp + edx - 0xc8]
sub edx, 4
mov eax, 1
mov cl, bl
shl eax, cl
dec eax
dec dword [ebp - 0x20]
and eax, dword [ebp - 8]
cmp eax, dword [ebp + edx - 0x10c]
jne 0x401f76
jmp 0x401d20
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
cmp dword [ebp - 0x1c], eax
jge 0x401d0e
mov ecx, dword [ebp - 0xc4]
mov eax, dword [ebp + 0x20]
cmp dword [ebp - 0x18], 0
mov dword [eax], ecx
je 0x401fe6
cmp dword [ebp - 0x1c], 1
je 0x401fe6
mov eax, 1
jmp 0x401fe8
cmp dword [ebp - 0x20], 0
je 0x401fdf
push dword [ebp - 0x14c]
call fcn.00401fef
add esp, 4
mov eax, 3
jmp 0x401fe8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret