Function at 0x41c950
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4a0
push ebx
push edi
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 0x3c], edi
cmp dword [edi + 0x14], ebx
je 0x41c974
pop edi
mov eax, 0x40000
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp byte [edi + 0x2c], bl
je 0x41c986
pop edi
mov eax, 0x50000
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push esi
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x20], ebx
cmp dword [edi], ebx
je 0x41c99d
cmp esi, 4
je 0x41c99d
mov dword [ebp - 0x20], 0xc
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x4a0]
push ecx
call dword [0x420084]
cmp byte [ebp - 0x4a0], bl
je 0x41d160
lea eax, [ebp - 0x4a0]
cmp byte [eax], 0x5c
jne 0x41c9c8
mov byte [eax], 0x2f
inc eax
cmp byte [eax], bl
jne 0x41c9c0
cmp esi, 4
sete dl
mov byte [ebp + 0xb], dl
cmp dl, bl
je 0x41c9fa
lea eax, [ebp - 0x4a0]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x41c9e3
sub eax, esi
cmp byte [ebp + eax - 0x4a1], 0x2f
mov byte [ebp - 1], 1
jne 0x41c9fd
mov byte [ebp - 1], bl
mov dword [ebp - 8], 8
cmp dl, bl
jne 0x41ca1b
lea edx, [ebp - 0x4a0]
push edx
call fcn.0041a890
add esp, 4
test al, al
je 0x41ca1e
mov dword [ebp - 8], ebx
mov eax, dword [ebp + 0x14]
cmp eax, 2
jne 0x41ca33
mov eax, dword [ebp + 0xc]
push eax
mov ecx, edi
call fcn.0041bbe0
jmp 0x41ca6f
cmp eax, 1
jne 0x41ca49
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push ecx
push edx
mov ecx, edi
call fcn.0041af00
jmp 0x41ca6f
cmp eax, 3
jne 0x41ca5f
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
mov ecx, edi
call fcn.0041b040
jmp 0x41ca6f
cmp eax, 4
jne 0x41d160
mov ecx, edi
call fcn.0041b130
cmp eax, ebx
jne 0x41d165
mov esi, dword [0x420084]
push 0x4201e9
lea edx, [ebp - 0x364]
push edx
mov dword [ebp - 0x40], ebx
call esi
lea eax, [ebp - 0x4a0]
push eax
lea ecx, [ebp - 0x254]
push ecx
call esi
lea edx, [ebp - 0x254]
push edx
call dword [0x420034]
mov dword [ebp - 0x384], eax
cmp byte [ebp - 1], bl
je 0x41cace
push 0x423b80
lea eax, [ebp - 0x254]
push eax
call dword [0x4200a4]
inc dword [ebp - 0x384]
push 0x4201e9
lea ecx, [ebp - 0x150]
push ecx
call esi
xor edx, edx
mov word [ebp - 0x372], dx
mov edx, dword [edi + 0x68]
mov eax, 8
mov dword [ebp - 0x258], ebx
mov dword [ebp - 0x378], ebx
mov dword [ebp - 0x4c], 1
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x39c], 0x140b17
mov dword [ebp - 0x394], edx
mov dword [ebp - 0x390], ebx
mov word [ebp - 0x398], ax
cmp dword [edi], ebx
je 0x41cb35
cmp byte [ebp + 0xb], bl
jne 0x41cb35
mov eax, 9
mov word [ebp - 0x398], ax
mov word [ebp - 0x370], ax
mov eax, dword [ebp - 8]
mov word [ebp - 0x396], ax
cmp eax, ebx
jne 0x41cb5c
mov eax, dword [edi + 0x70]
cmp eax, ebx
jl 0x41cb5c
add eax, dword [ebp - 0x20]
mov dword [ebp - 0x38c], eax
jmp 0x41cb62
mov dword [ebp - 0x38c], ebx
mov edx, dword [edi + 0x70]
mov ecx, dword [edi + 0x4c]
mov dword [ebp - 0x388], edx
mov edx, dword [edi + 0x18]
add edx, dword [edi + 0x10]
xor eax, eax
mov word [ebp - 0x374], ax
mov dword [ebp - 0x36c], ecx
mov dword [ebp - 0x368], edx
mov dl, byte [edi + 0x58]
mov byte [ebp - 0x17], dl
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x260], eax
mov eax, dword [edi + 0x5c]
mov esi, eax
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x25c], ecx
mov ecx, dword [edi + 0x58]
mov edx, ecx
shrd edx, esi, 8
sar esi, 8
mov esi, eax
mov byte [ebp - 0x16], dl
mov edx, ecx
shrd edx, esi, 0x10
shrd ecx, eax, 0x18
sar esi, 0x10
sar eax, 0x18
mov al, byte [edi + 0x50]
mov byte [ebp - 0x13], al
mov eax, dword [edi + 0x54]
mov byte [ebp - 0x15], dl
mov dl, cl
mov ecx, dword [edi + 0x50]
mov ebx, ecx
mov esi, eax
shrd ebx, esi, 8
mov byte [ebp - 0x12], bl
mov ebx, ecx
shrd ecx, eax, 0x18
sar esi, 8
mov esi, eax
shrd ebx, esi, 0x10
mov byte [ebp - 0x10], cl
mov cl, byte [edi + 0x60]
sar esi, 0x10
sar eax, 0x18
mov eax, dword [edi + 0x64]
mov byte [ebp - 0xf], cl
mov ecx, dword [edi + 0x60]
mov byte [ebp - 0x11], bl
mov ebx, ecx
mov esi, eax
shrd ebx, esi, 8
mov byte [ebp - 0xe], bl
mov ebx, ecx
shrd ecx, eax, 0x18
sar esi, 8
mov esi, eax
shrd ebx, esi, 0x10
push edi
mov dword [ebp - 0x1c], 0xd5455
mov byte [ebp - 0x14], dl
sar eax, 0x18
mov eax, dword [ebp - 0x1c]
mov byte [ebp - 0x30], dl
mov byte [ebp - 0x18], 7
mov byte [ebp - 0xc], cl
mov ecx, dword [ebp - 0x18]
lea edx, [ebp - 0x39c]
push 0x41afc0
mov dword [ebp - 0x38], eax
push edx
mov dword [ebp - 0x380], 0x11
mov dword [ebp - 0x37c], 9
sar esi, 0x10
mov byte [ebp - 0xd], bl
mov dword [ebp - 0x34], ecx
mov byte [ebp - 0x36], 5
call fcn.00419ee0
add esp, 0xc
test eax, eax
je 0x41cc93
mov ecx, edi
call fcn.0041b2e0
pop esi
pop edi
mov eax, 0x400
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp - 0x384]
mov ecx, dword [ebp - 0x380]
lea edx, [ecx + eax + 0x1e]
add dword [edi + 0x18], edx
cmp dword [edi + 0x14], 0
je 0x41ccbf
mov ecx, edi
call fcn.0041b2e0
mov eax, dword [edi + 0x14]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
lea esi, [edi + 0x30]
mov dword [edi + 0x34], 0x23456789
mov dword [edi + 0x38], 0x34567890
mov edi, dword [edi]
mov dword [esi], 0x12345678
test edi, edi
je 0x41ccf4
lea esp, [esp]
movzx eax, byte [edi]
test al, al
je 0x41ccf4
push eax
push esi
call fcn.0041a840
add esp, 8
inc edi
jne 0x41cce0
cmp byte [0x63b900], 0
jne 0x41cd16
call dword [0x420140]
mov edi, eax
call dword [0x4200a0]
xor edi, eax
push edi
call fcn.0041d2a2
add esp, 4
xor edi, edi
call fcn.0041d29c
sar eax, 7
mov byte [ebp + edi - 0x2c], al
inc edi
cmp edi, 0xc
jl 0x41cd18
mov eax, dword [ebp - 0x394]
mov edi, dword [esi + 4]
mov ecx, dword [esi]
shr eax, 8
xor edx, edx
mov byte [ebp - 0x21], al
mov eax, dword [esi + 8]
mov dword [ebp + 0xc], edx
mov dword [ebp + 0x10], edi
mov dl, byte [ebp + edx - 0x2c]
movsx edx, dl
xor edx, ecx
and edx, 0xff
mov edi, ecx
mov ecx, dword [edx*4 + str.aK___]
shr edi, 8
xor ecx, edi
movzx edi, cl
add edi, dword [ebp + 0x10]
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 + str.aK___]
mov edx, ebx
xor edx, 1
imul edx, ebx
mov ebx, dword [ebp + 0xc]
shr edx, 8
xor dl, byte [ebp + ebx - 0x2c]
mov dword [esi + 8], eax
mov byte [ebp + ebx - 0x2c], dl
mov edx, ebx
movzx ebx, byte [ebp + edx - 0x2b]
mov byte [ebp + 0xc], bl
mov ebx, eax
and ebx, 0xfffd
or ebx, 2
mov dword [ebp + 0x14], ebx
movsx ebx, byte [ebp + 0xc]
xor ebx, ecx
and ebx, 0xff
mov ebx, dword [ebx*4 + str.aK___]
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 + 0x10], ebx
and edi, 0xff
mov dword [esi + 4], ecx
xor eax, dword [edi*4 + str.aK___]
mov edi, eax
mov eax, dword [ebp + 0x14]
mov ebx, eax
xor ebx, 1
imul ebx, eax
shr ebx, 8
xor bl, byte [ebp + 0xc]
mov eax, edi
mov byte [ebp + edx - 0x2b], bl
mov bl, byte [ebp + edx - 0x2a]
and eax, 0xfffd
or eax, 2
mov byte [ebp + 0xc], bl
mov dword [ebp + 0x14], eax
mov eax, dword [ebp + 0x10]
movsx ebx, bl
xor ebx, eax
shr eax, 8
and ebx, 0xff
mov dword [ebp + 0x10], eax
mov dword [esi + 8], edi
mov eax, dword [ebx*4 + str.aK___]
xor eax, dword [ebp + 0x10]
mov dword [ebp + 0x10], 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 + str.aK___]
mov ecx, dword [ebp + 0x14]
mov ebx, ecx
xor ebx, 1
imul ebx, ecx
shr ebx, 8
xor bl, byte [ebp + 0xc]
mov ecx, edi
mov byte [ebp + edx - 0x2a], bl
mov bl, byte [ebp + edx - 0x29]
mov byte [ebp + 0xc], bl
and ecx, 0xfffd
movsx ebx, bl
or ecx, 2
mov dword [ebp + 0x14], ecx
mov ecx, dword [ebp + 0x10]
xor ebx, ecx
and ebx, 0xff
shr ecx, 8
mov dword [esi + 8], edi
mov dword [ebp + 0x10], ecx
mov ecx, dword [ebx*4 + str.aK___]
xor ecx, dword [ebp + 0x10]
add edx, 4
movzx ebx, cl
add eax, ebx
imul eax, eax, 0x8088405
inc eax
mov dword [esi + 4], eax
mov dword [ebp + 0x10], eax
shr eax, 0x18
xor eax, edi
and eax, 0xff
shr edi, 8
mov dword [esi], ecx
xor edi, dword [eax*4 + str.aK___]
mov eax, edi
mov edi, dword [ebp + 0x14]
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 - 0x2d], bl
mov dword [ebp + 0xc], edx
cmp edx, 0xc
jl 0x41cd46
mov ebx, dword [ebp - 0x3c]
xor esi, esi
cmp dword [ebx], esi
je 0x41cf3e
cmp byte [ebp + 0xb], 0
jne 0x41cf3e
push 0xc
lea edx, [ebp - 0x2c]
push edx
mov ecx, ebx
call fcn.0041ad30
add dword [ebx + 0x18], 0xc
xor edi, edi
cmp dword [ebx], esi
je 0x41cf4f
cmp byte [ebp + 0xb], 0
jne 0x41cf4f
lea eax, [edi + 1]
jmp 0x41cf51
xor eax, eax
cmp byte [ebp + 0xb], 0
mov byte [ebx + 0x2d], al
jne 0x41cf83
mov eax, dword [ebp - 8]
cmp eax, 8
jne 0x41cf74
lea eax, [ebp - 0x39c]
push eax
mov ecx, ebx
call fcn.0041c830
mov edi, eax
jmp 0x41cf89
cmp eax, esi
jne 0x41cf89
mov ecx, ebx
call fcn.0041b340
mov edi, eax
jmp 0x41cf89
mov dword [ebx + 0x90], esi
cmp byte [ebx + 0x80], 0
mov byte [ebx + 0x2d], 0
je 0x41cfa4
mov eax, dword [ebx + 0x7c]
cmp eax, esi
je 0x41cfa4
push eax
call dword [0x420058]
mov ecx, dword [ebx + 0x90]
mov eax, dword [ebx + 0x14]
add dword [ebx + 0x18], ecx
mov dword [ebx + 0x7c], esi
mov esi, dword [ebx + 0x74]
mov dword [ebx + 0x70], esi
test eax, eax
jne 0x41d165
test edi, edi
jne 0x41cc85
mov edx, dword [ebp - 0x20]
lea eax, [ecx + edx]
cmp dword [ebp - 0x38c], eax
mov edx, dword [ebx + 0x78]
sete cl
cmp byte [ebx + 0x1c], 0
mov dword [ebp - 0x390], edx
mov dword [ebp - 0x38c], eax
mov dword [ebp - 0x388], esi
je 0x41d07e
cmp dword [ebx], edi
je 0x41d001
cmp byte [ebp + 0xb], 0
je 0x41d07e
test byte [ebp - 0x398], 1
mov ax, word [ebp - 8]
mov word [ebp - 0x396], ax
jne 0x41d021
mov ecx, 0xfff7
and word [ebp - 0x398], cx
mov eax, dword [ebp - 0x368]
sub eax, dword [ebx + 0x10]
mov dx, word [ebp - 0x398]
push eax
mov ecx, ebx
mov word [ebp - 0x370], dx
call fcn.0041ae90
test al, al
je 0x41d070
push ebx
lea ecx, [ebp - 0x39c]
push 0x41afc0
push ecx
call fcn.00419ee0
add esp, 0xc
test eax, eax
jne 0x41cc85
mov edx, dword [ebx + 0x18]
push edx
mov ecx, ebx
call fcn.0041ae90
test al, al
jne 0x41d0cf
pop esi
pop edi
mov eax, 0x2000000
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp - 8]
cmp word [ebp - 0x396], ax
jne 0x41d092
test eax, eax
jne 0x41d0a0
test cl, cl
jne 0x41d0a0
pop esi
pop edi
mov eax, 0x4000000
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push ebx
lea eax, [ebp - 0x39c]
push 0x41afc0
push eax
call fcn.0041a120
add esp, 0xc
test eax, eax
jne 0x41cc85
mov cx, word [ebp - 0x370]
add dword [ebx + 0x18], 0x10
mov word [ebp - 0x398], cx
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x41d165
mov edx, dword [ebp - 0x37c]
push edx
call fcn.00411670
mov ecx, dword [ebp - 0x25c]
mov esi, eax
mov eax, dword [ebp - 0x37c]
push eax
push ecx
push esi
call fcn.0041d254
push 0x360
mov dword [ebp - 0x25c], esi
call fcn.00411670
mov ecx, 0xd8
lea esi, [ebp - 0x39c]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x44]
add esp, 0x14
test ecx, ecx
jne 0x41d133
pop esi
mov dword [ebx + 0x44], eax
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ecx + 0x35c], 0
je 0x41d14f
lea esp, [esp]
mov ecx, dword [ecx + 0x35c]
cmp dword [ecx + 0x35c], 0
jne 0x41d140
pop esi
pop edi
mov dword [ecx + 0x35c], eax
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, 0x10000
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x10