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

Disassembly:
sub esp, 0x4b4
mov eax, dword [0x46e074]
xor eax, esp
mov dword [esp + 0x4ac], eax
mov eax, dword [esp + 0x4bc]
push ebx
push ebp
mov ebp, dword [esp + 0x4c0]
push esi
xor esi, esi
push edi
mov ebx, ecx
cmp dword [ebp + 0x14], esi
je 0x410059
mov eax, 0x40000
jmp 0x410797
cmp byte [ebp + 0x2c], 0
je 0x410069
mov eax, 0x50000
jmp 0x410797
mov dword [esp + 0x14], esi
cmp dword [ebp], esi
je 0x41007a
mov dword [esp + 0x14], 0xc
lea edx, [esp + 0x3b0]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x410083
cmp byte [esp + 0x3b0], cl
jne 0x4100a0
mov eax, 0x10000
jmp 0x410797
lea eax, [esp + 0x3b0]
cmp byte [eax], 0x5c
jne 0x4100af
mov byte [eax], 0x2f
inc eax
cmp byte [eax], 0
jne 0x4100a7
mov edi, 8
lea ecx, [esp + 0x3b0]
mov dword [esp + 0x1c], edi
call fcn.0040f5f0
test al, al
je 0x4100d4
mov dword [esp + 0x1c], esi
mov edi, esi
mov eax, ebx
mov ecx, ebp
call fcn.0040fbe0
cmp eax, esi
jne 0x410797
mov dword [esp + 0x37c], esi
mov byte [esp + 0x58], 0
xor eax, eax
jmp 0x410100
mov cl, byte [esp + eax + 0x3b0]
mov byte [esp + eax + 0x168], cl
inc eax
test cl, cl
jne 0x410100
lea eax, [esp + 0x168]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x410120
sub eax, edx
mov dword [esp + 0x38], eax
xor eax, eax
mov word [esp + 0x4a], ax
mov eax, dword [ebp + 0x68]
mov byte [esp + 0x26c], cl
mov dword [esp + 0x28], eax
mov ecx, 0xb17
mov edx, 0x14
mov eax, 8
mov dword [esp + 0x164], esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x370], 1
mov dword [esp + 0x378], esi
mov word [esp + 0x20], cx
mov word [esp + 0x22], dx
mov dword [esp + 0x2c], esi
mov word [esp + 0x24], ax
cmp dword [ebp], esi
je 0x410190
mov eax, 9
mov word [esp + 0x24], ax
mov word [esp + 0x4c], ax
mov word [esp + 0x26], di
cmp edi, esi
jne 0x4101b1
mov eax, dword [ebp + 0x70]
cmp eax, esi
jl 0x4101b1
mov ecx, dword [esp + 0x14]
add eax, ecx
mov dword [esp + 0x30], eax
jmp 0x4101b5
mov dword [esp + 0x30], esi
mov edx, dword [ebp + 0x70]
mov ecx, dword [ebp + 0x4c]
mov esi, dword [ebp + 0x58]
mov edi, dword [ebp + 0x5c]
mov dword [esp + 0x34], edx
mov edx, dword [ebp + 0x18]
add edx, dword [ebp + 0x10]
xor eax, eax
mov word [esp + 0x48], ax
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], edx
mov dl, byte [ebp + 0x58]
lea ecx, [esp + 0x3a4]
lea eax, [esp + 0x384]
mov dword [esp + 0x15c], eax
mov dword [esp + 0x160], ecx
mov byte [esp + 0x389], dl
mov eax, esi
mov edx, edi
mov cl, 8
mov dword [esp + 0x3c], 0x11
mov dword [esp + 0x40], 9
mov byte [esp + 0x384], 0x55
mov byte [esp + 0x385], 0x54
mov byte [esp + 0x386], 0xd
mov byte [esp + 0x387], 0
mov byte [esp + 0x388], 7
call fcn.0045d3c0
mov byte [esp + 0x38a], al
mov eax, esi
mov edx, edi
mov cl, 0x10
call fcn.0045d3c0
mov byte [esp + 0x38b], al
mov eax, esi
mov edx, edi
mov cl, 0x18
call fcn.0045d3c0
mov esi, dword [ebp + 0x50]
mov edi, dword [ebp + 0x54]
mov bl, al
mov al, byte [ebp + 0x50]
mov byte [esp + 0x38d], al
mov eax, esi
mov edx, edi
mov cl, 8
mov byte [esp + 0x38c], bl
call fcn.0045d3c0
mov byte [esp + 0x38e], al
mov eax, esi
mov edx, edi
mov cl, 0x10
call fcn.0045d3c0
mov byte [esp + 0x38f], al
mov eax, esi
mov edx, edi
mov cl, 0x18
call fcn.0045d3c0
mov cl, byte [ebp + 0x60]
mov esi, dword [ebp + 0x60]
mov edi, dword [ebp + 0x64]
mov byte [esp + 0x390], al
mov byte [esp + 0x391], cl
mov eax, esi
mov edx, edi
mov cl, 8
call fcn.0045d3c0
mov byte [esp + 0x392], al
mov eax, esi
mov edx, edi
mov cl, 0x10
call fcn.0045d3c0
mov byte [esp + 0x393], al
mov eax, esi
mov edx, edi
mov cl, 0x18
call fcn.0045d3c0
mov edx, dword [esp + 0x384]
mov byte [esp + 0x394], al
mov eax, dword [esp + 0x388]
mov dword [esp + 0x3a4], edx
mov esi, ebp
lea edi, [esp + 0x20]
mov dword [esp + 0x3a8], eax
mov byte [esp + 0x3ac], bl
mov byte [esp + 0x3a6], 5
call fcn.0040ea30
test eax, eax
je 0x410345
call fcn.0040fe50
mov eax, 0x400
jmp 0x410797
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
lea eax, [ecx + edx + 0x1e]
add dword [ebp + 0x18], eax
cmp dword [ebp + 0x14], 0
je 0x410367
call fcn.0040fe50
mov eax, dword [ebp + 0x14]
jmp 0x410797
mov edi, dword [ebp]
lea esi, [ebp + 0x30]
mov dword [esi], 0x12345678
mov dword [ebp + 0x34], 0x23456789
mov dword [ebp + 0x38], 0x34567890
test edi, edi
je 0x410397
mov cl, byte [edi]
test cl, cl
je 0x410397
mov edx, esi
call fcn.0040f5a0
add edi, 1
jne 0x410385
cmp byte [0x470800], 0
jne 0x4103b9
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edi, eax
push edi
call fcn.0044792f
add esp, 4
xor edi, edi
jmp 0x4103c0
call fcn.00447941
sar eax, 7
mov byte [esp + edi + 0x398], al
inc edi
cmp edi, 0xc
jl 0x4103c0
mov ecx, dword [esp + 0x28]
shr ecx, 8
mov byte [esp + 0x3a3], cl
mov dword [esp + 0x18], 0
mov edx, dword [esp + 0x18]
mov bl, byte [esp + edx + 0x398]
mov edi, dword [esi]
mov eax, dword [esi + 8]
movsx ecx, bl
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x462c30]
shr edi, 8
xor ecx, edi
mov dword [esi], ecx
movzx ecx, cl
add ecx, dword [esi + 4]
mov edx, eax
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 4], ecx
shr ecx, 0x18
xor ecx, eax
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x462c30]
and edx, 0xfffd
mov dword [esi + 8], eax
mov edi, dword [esi]
or edx, 2
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor al, bl
mov ebx, dword [esp + 0x18]
mov cl, byte [esp + ebx + 0x399]
movsx ecx, cl
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x462c30]
shr edi, 8
xor ecx, edi
mov dword [esi], ecx
movzx ecx, cl
add ecx, dword [esi + 4]
mov edi, dword [esi]
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esi + 4], ecx
shr ecx, 0x18
mov byte [esp + ebx + 0x398], al
mov eax, dword [esi + 8]
xor ecx, eax
and ecx, 0xff
mov edx, eax
shr eax, 8
xor eax, dword [ecx*4 + 0x462c30]
mov cl, byte [esp + ebx + 0x39a]
movsx ecx, cl
xor ecx, edi
and edx, 0xfffd
or edx, 2
mov dword [esi + 8], eax
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x462c30]
mov eax, edx
xor eax, 1
imul eax, edx
shr edi, 8
xor ecx, edi
mov dword [esi], ecx
movzx ecx, cl
add ecx, dword [esi + 4]
shr eax, 8
xor al, byte [esp + ebx + 0x399]
imul ecx, ecx, 0x8088405
mov byte [esp + ebx + 0x399], al
mov eax, dword [esi + 8]
mov edx, eax
and edx, 0xfffd
inc ecx
or edx, 2
mov dword [esi + 4], ecx
shr ecx, 0x18
xor ecx, eax
mov edi, dword [esi]
and ecx, 0xff
shr eax, 8
xor eax, dword [ecx*4 + 0x462c30]
mov cl, byte [esp + ebx + 0x39b]
movsx ecx, cl
mov dword [esi + 8], eax
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x462c30]
shr edi, 8
xor ecx, edi
mov dword [esi], ecx
movzx ecx, cl
add ecx, dword [esi + 4]
mov eax, edx
xor eax, 1
imul ecx, ecx, 0x8088405
imul eax, edx
shr eax, 8
xor al, byte [esp + ebx + 0x39a]
inc ecx
mov byte [esp + ebx + 0x39a], al
mov eax, dword [esi + 8]
mov edx, eax
mov dword [esi + 4], ecx
shr ecx, 0x18
xor ecx, eax
shr eax, 8
and ecx, 0xff
xor eax, dword [ecx*4 + 0x462c30]
and edx, 0xfffd
mov dword [esi + 8], eax
or edx, 2
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor al, byte [esp + ebx + 0x39b]
add ebx, 4
cmp ebx, 0xc
mov byte [esp + ebx + 0x397], al
mov dword [esp + 0x18], ebx
jl 0x4103eb
cmp dword [ebp], 0
je 0x4105dd
push 0xc
lea ecx, [esp + 0x39c]
push ecx
mov ecx, ebp
call fcn.0040f9e0
add dword [ebp + 0x18], 0xc
mov ebx, dword [esp + 0x1c]
xor esi, esi
xor eax, eax
cmp dword [ebp], esi
setne al
mov byte [ebp + 0x2d], al
cmp ebx, 8
jne 0x410601
lea edx, [esp + 0x20]
push edx
mov edi, ebp
call fcn.0040feb0
jmp 0x41060c
test ebx, ebx
jne 0x41060e
mov eax, ebp
call fcn.0040ffc0
mov esi, eax
cmp byte [ebp + 0x80], 0
mov byte [ebp + 0x2d], 0
je 0x410629
mov eax, dword [ebp + 0x7c]
test eax, eax
je 0x410629
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp + 0x90]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x74]
add dword [ebp + 0x18], edx
mov dword [ebp + 0x7c], 0
mov dword [ebp + 0x70], ecx
test eax, eax
jne 0x410797
test esi, esi
jne 0x41033b
mov eax, dword [esp + 0x14]
mov esi, dword [ebp + 0x78]
add eax, edx
cmp dword [esp + 0x30], eax
mov dword [esp + 0x2c], esi
sete dl
cmp byte [ebp + 0x1c], 0
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
je 0x4106d7
cmp dword [ebp], 0
jne 0x4106d7
test byte [esp + 0x24], 1
mov word [esp + 0x26], bx
jne 0x410690
mov ecx, 0xfff7
and word [esp + 0x24], cx
mov dx, word [esp + 0x24]
mov word [esp + 0x4c], dx
mov edx, dword [esp + 0x54]
sub edx, dword [ebp + 0x10]
mov eax, ebp
call fcn.0040fb30
test al, al
je 0x4106cd
mov esi, ebp
lea edi, [esp + 0x20]
call fcn.0040ea30
test eax, eax
jne 0x41033b
mov edx, dword [ebp + 0x18]
mov eax, ebp
call fcn.0040fb30
test al, al
jne 0x410711
mov eax, 0x2000000
jmp 0x410797
cmp word [esp + 0x26], bx
je 0x4106e8
mov eax, 0x4000000
jmp 0x410797
test ebx, ebx
jne 0x4106f0
test dl, dl
je 0x4106de
mov esi, ebp
lea edi, [esp + 0x20]
call fcn.0040ed00
test eax, eax
jne 0x41033b
mov ax, word [esp + 0x4c]
add dword [ebp + 0x18], 0x10
mov word [esp + 0x24], ax
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x410797
mov ecx, dword [esp + 0x40]
push ecx
call fcn.00445674
mov edx, dword [esp + 0x44]
add esp, 4
mov esi, eax
mov eax, dword [esp + 0x160]
push edx
push eax
push esi
call fcn.00448250
add esp, 0xc
push 0x360
mov dword [esp + 0x164], esi
call fcn.00445674
mov ecx, 0xd8
lea esi, [esp + 0x24]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0x44]
add esp, 4
test ecx, ecx
jne 0x41076a
mov dword [ebp + 0x44], eax
jmp 0x410795
cmp dword [ecx + 0x35c], 0
je 0x41078f
jmp 0x410780
mov ecx, dword [ecx + 0x35c]
cmp dword [ecx + 0x35c], 0
jne 0x410780
mov dword [ecx + 0x35c], eax
xor eax, eax
mov ecx, dword [esp + 0x4bc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004453f2
add esp, 0x4b4
ret 8