Function at 0x50e0d0
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5a8
push ebx
mov ebx, dword [ebp + 8]
push esi
xor esi, esi
push edi
cmp dword [ebx + 0x14], esi
je 0x50e0f4
mov eax, 0x40000
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp byte [ebx + 0x2c], 0
je 0x50e108
mov eax, 0x50000
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov dword [ebp - 0x24], esi
cmp dword [ebx], esi
je 0x50e116
mov dword [ebp - 0x24], 0xc
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x5a4]
push 0x104
push ecx
call dword [sym.imp.MSVCR100.dll_wcscpy_s]
add esp, 0xc
cmp word [ebp - 0x5a4], si
jne 0x50e146
mov eax, 0x10000
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
lea eax, [ebp - 0x5a4]
lea esp, [esp]
cmp word [eax], 0x5c
jne 0x50e15e
mov edx, 0x2f
mov word [eax], dx
add eax, 2
cmp word [eax], si
jne 0x50e150
lea edx, [ebp - 0x5a4]
mov dword [ebp - 0xc], 8
call fcn.0050d660
test al, al
je 0x50e17f
mov dword [ebp - 0xc], esi
mov eax, dword [ebp + 0x10]
mov ecx, ebx
call fcn.0050dc50
cmp eax, esi
jne 0x50e837
mov edi, dword [sym.imp.MSVCR100.dll_strcpy_s]
push 0x528927
lea eax, [ebp - 0x364]
push 0xa
push eax
mov dword [ebp - 0x40], esi
call edi
add esp, 0xc
push esi
push esi
push 0x104
lea ecx, [ebp - 0x254]
push ecx
push 0xffffffffffffffff
lea edx, [ebp - 0x5a4]
push edx
push esi
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [ebp - 0x254]
lea ecx, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x50e1e0
sub eax, ecx
push 0x528927
mov dword [ebp - 0x384], eax
lea eax, [ebp - 0x150]
push 2
push eax
call edi
xor ecx, ecx
mov word [ebp - 0x372], cx
mov ecx, dword [ebx + 0x68]
add esp, 0xc
mov eax, 8
mov dword [ebp - 0x258], esi
mov dword [ebp - 0x378], esi
mov dword [ebp - 0x4c], 1
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x39c], 0x140b17
mov dword [ebp - 0x394], ecx
mov dword [ebp - 0x390], esi
mov word [ebp - 0x398], ax
cmp dword [ebx], esi
je 0x50e256
mov eax, 9
mov word [ebp - 0x398], ax
mov word [ebp - 0x370], ax
mov eax, dword [ebp - 0xc]
mov word [ebp - 0x396], ax
cmp eax, esi
jne 0x50e27d
mov eax, dword [ebx + 0x70]
cmp eax, esi
jl 0x50e27d
add eax, dword [ebp - 0x24]
mov dword [ebp - 0x38c], eax
jmp 0x50e283
mov dword [ebp - 0x38c], esi
mov eax, dword [ebx + 0x70]
mov edx, dword [ebx + 0x4c]
mov esi, dword [ebx + 0x58]
mov dword [ebp - 0x388], eax
mov eax, dword [ebx + 0x18]
add eax, dword [ebx + 0x10]
mov dword [ebp - 0x36c], edx
mov dword [ebp - 0x368], eax
movzx eax, byte [ebx + 0x58]
xor ecx, ecx
mov byte [ebp - 0x1b], al
mov eax, dword [ebx + 0x5c]
mov word [ebp - 0x374], cx
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x260], ecx
lea edx, [ebp - 0x3c]
mov dword [ebp - 0x25c], edx
mov edx, eax
mov ecx, esi
shrd ecx, edx, 8
sar edx, 8
mov edx, eax
mov byte [ebp - 0x1a], cl
mov ecx, esi
shrd ecx, edx, 0x10
sar edx, 0x10
mov dl, byte [ebx + 0x50]
mov byte [ebp - 0x17], dl
mov byte [ebp - 0x19], cl
mov ecx, esi
mov esi, dword [ebx + 0x50]
shrd ecx, eax, 0x18
sar eax, 0x18
mov eax, dword [ebx + 0x54]
mov edi, eax
mov edx, esi
shrd edx, edi, 8
mov byte [ebp - 0x16], dl
sar edi, 8
mov edi, eax
mov edx, esi
shrd edx, edi, 0x10
mov byte [ebp - 0x15], dl
mov edx, esi
mov esi, dword [ebx + 0x60]
shrd edx, eax, 0x18
sar eax, 0x18
movzx eax, byte [ebx + 0x60]
mov byte [ebp - 0x14], dl
sar edi, 0x10
mov byte [ebp - 0x13], al
mov eax, dword [ebx + 0x64]
mov edi, eax
mov edx, esi
shrd edx, edi, 8
mov byte [ebp - 0x12], dl
sar edi, 8
mov edi, eax
mov edx, esi
shrd edx, edi, 0x10
mov byte [ebp - 0x11], dl
mov edx, esi
shrd edx, eax, 0x18
mov dword [ebp - 0x20], 0xd5455
sar eax, 0x18
mov eax, dword [ebp - 0x20]
mov byte [ebp - 0x1c], 7
mov byte [ebp - 0x10], dl
mov edx, dword [ebp - 0x1c]
sar edi, 0x10
mov dword [ebp - 0x3c], eax
mov esi, ebx
lea edi, [ebp - 0x39c]
mov dword [ebp - 0x380], 0x11
mov dword [ebp - 0x37c], 9
mov byte [ebp - 0x18], cl
mov dword [ebp - 0x38], edx
mov byte [ebp - 0x34], cl
mov byte [ebp - 0x3a], 5
call fcn.0050cb80
test eax, eax
je 0x50e3b0
call fcn.0050dec0
mov eax, 0x400
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 0x380]
mov ecx, dword [ebp - 0x384]
lea edx, [eax + ecx + 0x1e]
add dword [ebx + 0x18], edx
cmp dword [ebx + 0x14], 0
je 0x50e3da
call fcn.0050dec0
mov eax, dword [ebx + 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
lea esi, [ebx + 0x30]
mov dword [ebx + 0x34], 0x23456789
mov dword [ebx + 0x38], 0x34567890
mov ebx, dword [ebx]
mov dword [esi], 0x12345678
test ebx, ebx
je 0x50e407
mov cl, byte [ebx]
test cl, cl
je 0x50e407
mov edx, esi
call fcn.0050d610
inc ebx
jne 0x50e3f7
cmp byte [0x1579ad0], 0
jne 0x50e42a
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edi, eax
push edi
call dword [sym.imp.MSVCR100.dll_srand]
add esp, 4
mov ebx, dword [sym.imp.MSVCR100.dll_rand]
xor edi, edi
call ebx
sar eax, 7
mov byte [ebp + edi - 0x30], al
inc edi
cmp edi, 0xc
jl 0x50e432
mov eax, dword [ebp - 0x394]
mov edi, dword [esi + 4]
mov ecx, dword [esi]
shr eax, 8
xor edx, edx
mov byte [ebp - 0x25], al
mov eax, dword [esi + 8]
mov dword [ebp + 0xc], edx
mov dword [ebp - 8], edi
mov dl, byte [ebp + edx - 0x30]
movsx edx, dl
xor edx, ecx
and edx, 0xff
mov edi, ecx
mov ecx, dword [edx*4 + 0x539a00]
shr edi, 8
xor ecx, edi
movzx edi, cl
add edi, dword [ebp - 8]
mov ebx, eax
imul edi, edi, 0x8088405
and ebx, 0xfffd
or ebx, 2
inc edi
mov edx, edi
shr edx, 0x18
xor edx, eax
shr eax, 8
mov dword [esi], ecx
mov dword [esi + 4], edi
and edx, 0xff
xor eax, dword [edx*4 + 0x539a00]
mov edx, ebx
xor edx, 1
imul edx, ebx
mov ebx, dword [ebp + 0xc]
shr edx, 8
xor dl, byte [ebp + ebx - 0x30]
mov dword [esi + 8], eax
mov byte [ebp + ebx - 0x30], dl
mov edx, ebx
movzx ebx, byte [ebp + edx - 0x2f]
mov byte [ebp + 0xc], bl
mov ebx, eax
and ebx, 0xfffd
or ebx, 2
mov dword [ebp + 0x10], ebx
movsx ebx, byte [ebp + 0xc]
xor ebx, ecx
and ebx, 0xff
mov ebx, dword [ebx*4 + 0x539a00]
shr ecx, 8
xor ebx, ecx
movzx ecx, bl
add ecx, edi
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi], ebx
mov edi, ecx
shr edi, 0x18
xor edi, eax
shr eax, 8
mov dword [ebp - 8], ebx
and edi, 0xff
mov dword [esi + 4], ecx
xor eax, dword [edi*4 + 0x539a00]
mov edi, eax
mov eax, dword [ebp + 0x10]
mov ebx, eax
xor ebx, 1
imul ebx, eax
shr ebx, 8
xor bl, byte [ebp + 0xc]
mov eax, edi
mov byte [ebp + edx - 0x2f], bl
mov bl, byte [ebp + edx - 0x2e]
and eax, 0xfffd
or eax, 2
mov byte [ebp + 0xc], bl
mov dword [ebp + 0x10], eax
mov eax, dword [ebp - 8]
movsx ebx, bl
xor ebx, eax
shr eax, 8
and ebx, 0xff
mov dword [ebp - 8], eax
mov dword [esi + 8], edi
mov eax, dword [ebx*4 + 0x539a00]
xor eax, dword [ebp - 8]
mov dword [ebp - 8], eax
mov dword [esi], eax
movzx eax, al
add eax, ecx
imul eax, eax, 0x8088405
inc eax
mov ecx, eax
shr ecx, 0x18
xor ecx, edi
mov dword [esi + 4], eax
and ecx, 0xff
shr edi, 8
xor edi, dword [ecx*4 + 0x539a00]
mov ecx, dword [ebp + 0x10]
mov ebx, ecx
xor ebx, 1
imul ebx, ecx
shr ebx, 8
xor bl, byte [ebp + 0xc]
mov ecx, edi
mov byte [ebp + edx - 0x2e], bl
mov bl, byte [ebp + edx - 0x2d]
mov byte [ebp + 0xc], bl
and ecx, 0xfffd
movsx ebx, bl
or ecx, 2
mov dword [ebp + 0x10], ecx
mov ecx, dword [ebp - 8]
xor ebx, ecx
and ebx, 0xff
shr ecx, 8
mov dword [esi + 8], edi
mov dword [ebp - 8], ecx
mov ecx, dword [ebx*4 + 0x539a00]
xor ecx, dword [ebp - 8]
add edx, 4
movzx ebx, cl
add eax, ebx
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 4], eax
mov dword [ebp - 8], eax
shr eax, 0x18
xor eax, edi
and eax, 0xff
shr edi, 8
mov dword [esi], ecx
xor edi, dword [eax*4 + 0x539a00]
mov eax, edi
mov edi, dword [ebp + 0x10]
mov ebx, edi
xor ebx, 1
imul ebx, edi
shr ebx, 8
xor bl, byte [ebp + 0xc]
mov dword [esi + 8], eax
mov byte [ebp + edx - 0x31], bl
mov dword [ebp + 0xc], edx
cmp edx, 0xc
jl 0x50e45d
mov ebx, dword [ebp + 8]
cmp dword [ebx], 0
je 0x50e64e
push 0xc
lea edx, [ebp - 0x30]
push edx
mov ecx, ebx
call fcn.0050da20
add dword [ebx + 0x18], 0xc
mov edx, dword [ebp - 0xc]
xor eax, eax
xor esi, esi
cmp dword [ebx], eax
setne al
mov byte [ebx + 0x2d], al
cmp edx, 8
jne 0x50e672
lea eax, [ebp - 0x39c]
push eax
mov edi, ebx
call fcn.0050df20
jmp 0x50e67d
test edx, edx
jne 0x50e682
mov edi, ebx
call fcn.0050e060
mov edx, dword [ebp - 0xc]
mov esi, eax
cmp byte [ebx + 0x80], 0
mov byte [ebx + 0x2d], 0
je 0x50e6a0
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x50e6a0
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebx + 0x90]
mov eax, dword [ebx + 0x14]
mov edi, dword [ebx + 0x74]
add dword [ebx + 0x18], ecx
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x70], edi
test eax, eax
jne 0x50e837
test esi, esi
jne 0x50e3a2
mov eax, dword [ebp - 0x24]
mov esi, dword [ebx + 0x78]
add eax, ecx
cmp dword [ebp - 0x38c], eax
mov dword [ebp - 0x390], esi
sete cl
cmp byte [ebx + 0x1c], 0
mov dword [ebp - 0x38c], eax
mov dword [ebp - 0x388], edi
je 0x50e766
cmp dword [ebx], 0
jne 0x50e766
test byte [ebp - 0x398], 1
mov word [ebp - 0x396], dx
jne 0x50e713
mov ecx, 0xfff7
and word [ebp - 0x398], cx
mov dx, word [ebp - 0x398]
mov word [ebp - 0x370], dx
mov edx, dword [ebp - 0x368]
sub edx, dword [ebx + 0x10]
mov eax, ebx
call fcn.0050db90
test al, al
je 0x50e758
mov esi, ebx
lea edi, [ebp - 0x39c]
call fcn.0050cb80
test eax, eax
jne 0x50e3a2
mov edx, dword [ebx + 0x18]
mov eax, ebx
call fcn.0050db90
test al, al
jne 0x50e7ac
mov eax, 0x2000000
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp word [ebp - 0x396], dx
je 0x50e77d
mov eax, 0x4000000
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
test edx, edx
jne 0x50e785
test cl, cl
je 0x50e76f
mov esi, ebx
lea edi, [ebp - 0x39c]
call fcn.0050ce20
test eax, eax
jne 0x50e3a2
mov ax, word [ebp - 0x370]
add dword [ebx + 0x18], 0x10
mov word [ebp - 0x398], ax
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x50e837
mov ecx, dword [ebp - 0x37c]
push ecx
call fcn.0050ec2a
mov edx, dword [ebp - 0x37c]
add esp, 4
mov esi, eax
mov eax, dword [ebp - 0x25c]
push edx
push eax
push esi
call sub.MSVCR100.dll_memcpy
add esp, 0xc
push 0x360
mov dword [ebp - 0x25c], esi
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
mov ecx, 0xd8
lea esi, [ebp - 0x39c]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x44]
add esp, 4
test ecx, ecx
jne 0x50e817
mov dword [ebx + 0x44], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ecx + 0x35c], 0
je 0x50e82f
mov ecx, dword [ecx + 0x35c]
cmp dword [ecx + 0x35c], 0
jne 0x50e820
mov dword [ecx + 0x35c], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc