Function at 0x407fd0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4217a9
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.00402670
push eax
mov ecx, ebx
call fcn.00401f50
push 0
push 0
mov ecx, ebx
call fcn.004026c0
lea ecx, [ebp - 0x2b]
mov dword [ebp - 0x34], 1
call fcn.00402670
push eax
lea ecx, [ebp - 0x28]
call fcn.00401f50
push 0
push 0
lea ecx, [ebp - 0x28]
call fcn.004026c0
lea eax, [ebp + 8]
mov byte [ebp - 4], 2
cmp ebx, eax
je 0x408081
lea eax, [ebp - 0x29]
push eax
lea ecx, [ebp + 8]
call fcn.004026a0
lea eax, [ebp - 0x2a]
mov ecx, ebx
push eax
call fcn.004026a0
push 0xffffffffffffffff
push 0
lea eax, [ebp + 8]
mov ecx, ebx
push eax
call fcn.00402140
xor edi, edi
cmp dword [ebp + 0x18], edi
jbe 0x4080da
lea ecx, [ebp + 8]
call fcn.00402100
mov ecx, ebx
lea esi, [eax + edi*2]
call fcn.00402100
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.00402100
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 0x408088
lea eax, [ebp + 8]
cmp eax, ebx
je 0x408105
lea eax, [ebp - 0x2a]
mov ecx, ebx
push eax
call fcn.004026a0
lea eax, [ebp - 0x29]
push eax
lea ecx, [ebp + 8]
call fcn.004026a0
push 0xffffffffffffffff
push 0
push ebx
lea ecx, [ebp + 8]
call fcn.00402140
push 0
mov ecx, ebx
call fcn.00402880
xor esi, esi
mov dword [ebp - 0x30], esi
cmp dword [ebp + 0x18], esi
jbe 0x4081e1
lea esp, [esp]
lea ecx, [ebp + 8]
call fcn.00402100
movzx edi, byte [eax + esi*2]
lea ecx, [ebp - 0x28]
push 0x42bda8
lea eax, [eax + esi*2]
call fcn.004029a0
mov eax, 0x4ec4ec4f
lea ecx, [ebp - 0x28]
imul edi
sar edx, 3
mov esi, edx
shr esi, 0x1f
add esi, edx
call fcn.00402100
lea ecx, [esi + 0x41]
mov word [eax], cx
lea ecx, [ebp - 0x28]
imul eax, esi, 0x1a
sub edi, eax
add edi, 0x41
call fcn.00402100
lea ecx, [ebp - 0x28]
or esi, 0xffffffff
mov word [eax + 2], di
call fcn.00401fb0
lea ecx, [ebp - 0x28]
call fcn.00401fb0
mov ecx, dword [ebx + 0x10]
cmp eax, 0xffffffff
cmovb esi, eax
or eax, 0xffffffff
sub eax, ecx
cmp eax, esi
jbe 0x40820f
test esi, esi
je 0x4081d1
lea edi, [ecx + esi]
mov ecx, ebx
push 0
push edi
call fcn.00402760
test al, al
je 0x4081d1
push esi
lea ecx, [ebp - 0x28]
call fcn.00402100
push eax
mov ecx, ebx
call fcn.00402100
mov ecx, dword [ebx + 0x10]
lea eax, [eax + ecx*2]
push eax
call fcn.00402830
add esp, 0xc
mov ecx, ebx
push edi
call fcn.00402880
mov esi, dword [ebp - 0x30]
inc esi
mov dword [ebp - 0x30], esi
cmp esi, dword [ebp + 0x18]
jb 0x408120
lea ecx, [ebp - 0x28]
call fcn.00401f00
lea ecx, [ebp + 8]
call fcn.00401f00
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.00409240
mov esp, ebp
pop ebp
ret
mov ecx, ebx
call fcn.004021f0
int3