Function at 0x4080a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421879
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x42e008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x30], edx
mov ebx, ecx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], 0
lea ecx, [ebp - 0x2b]
mov dword [ebp - 4], 1
call fcn.00402750
push eax
mov ecx, ebx
call fcn.00402030
push 0
push 0
mov ecx, ebx
call fcn.004027a0
lea ecx, [ebp - 0x2b]
mov dword [ebp - 0x34], 1
call fcn.00402750
push eax
lea ecx, [ebp - 0x28]
call fcn.00402030
push 0
push 0
lea ecx, [ebp - 0x28]
call fcn.004027a0
lea eax, [ebp + 8]
mov byte [ebp - 4], 2
cmp ebx, eax
je 0x408151
lea eax, [ebp - 0x29]
push eax
lea ecx, [ebp + 8]
call fcn.00402780
lea eax, [ebp - 0x2a]
mov ecx, ebx
push eax
call fcn.00402780
push 0xffffffffffffffff
push 0
lea eax, [ebp + 8]
mov ecx, ebx
push eax
call fcn.00402220
xor edi, edi
cmp dword [ebp + 0x18], edi
jbe 0x4081aa
lea ecx, [ebp + 8]
call fcn.004021e0
mov ecx, ebx
lea esi, [eax + edi*2]
call fcn.004021e0
lea ecx, [eax + edi*2]
mov ax, word [ebp - 0x30]
shr ax, 8
xor ax, word [esi]
mov word [ecx], ax
mov ecx, ebx
call fcn.004021e0
movzx ecx, byte [eax + edi*2]
add cx, word [ebp - 0x30]
lea eax, [eax + edi*2]
inc edi
mov eax, 0x3193
imul cx, ax
mov eax, 0x58bf
sub ax, cx
movzx eax, ax
mov dword [ebp - 0x30], eax
cmp edi, dword [ebp + 0x18]
jb 0x408158
lea eax, [ebp + 8]
cmp eax, ebx
je 0x4081d5
lea eax, [ebp - 0x2a]
mov ecx, ebx
push eax
call fcn.00402780
lea eax, [ebp - 0x29]
push eax
lea ecx, [ebp + 8]
call fcn.00402780
push 0xffffffffffffffff
push 0
push ebx
lea ecx, [ebp + 8]
call fcn.00402220
push 0
mov ecx, ebx
call fcn.00402960
xor esi, esi
mov dword [ebp - 0x30], esi
cmp dword [ebp + 0x18], esi
jbe 0x4082b1
lea esp, [esp]
lea ecx, [ebp + 8]
call fcn.004021e0
movzx edi, byte [eax + esi*2]
lea ecx, [ebp - 0x28]
push 0x42c048
lea eax, [eax + esi*2]
call fcn.00402a80
mov eax, 0x4ec4ec4f
lea ecx, [ebp - 0x28]
imul edi
sar edx, 3
mov esi, edx
shr esi, 0x1f
add esi, edx
call fcn.004021e0
lea ecx, [esi + 0x41]
mov word [eax], cx
lea ecx, [ebp - 0x28]
imul eax, esi, 0x1a
sub edi, eax
add edi, 0x41
call fcn.004021e0
lea ecx, [ebp - 0x28]
or esi, 0xffffffff
mov word [eax + 2], di
call fcn.00402090
lea ecx, [ebp - 0x28]
call fcn.00402090
mov ecx, dword [ebx + 0x10]
cmp eax, 0xffffffff
cmovb esi, eax
or eax, 0xffffffff
sub eax, ecx
cmp eax, esi
jbe 0x4082df
test esi, esi
je 0x4082a1
lea edi, [ecx + esi]
mov ecx, ebx
push 0
push edi
call fcn.00402840
test al, al
je 0x4082a1
push esi
lea ecx, [ebp - 0x28]
call fcn.004021e0
push eax
mov ecx, ebx
call fcn.004021e0
mov ecx, dword [ebx + 0x10]
lea eax, [eax + ecx*2]
push eax
call fcn.00402910
add esp, 0xc
mov ecx, ebx
push edi
call fcn.00402960
mov esi, dword [ebp - 0x30]
inc esi
mov dword [ebp - 0x30], esi
cmp esi, dword [ebp + 0x18]
jb 0x4081f0
lea ecx, [ebp - 0x28]
call fcn.00401fe0
lea ecx, [ebp + 8]
call fcn.00401fe0
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00409310
mov esp, ebp
pop ebp
ret
mov ecx, ebx
call fcn.004022d0
int3