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

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov esi, ecx
push 0x78
lea ebp, [esi + 0x98]
push 0
push ebp
mov ebx, eax
call sub.MSVCR100.dll_memset
mov edi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
add esp, 0xc
push 0x4000
push 0
call edi
mov dword [ebp], eax
test eax, eax
je 0x41f819
cmp word [esi + 0x56], 0
je 0x41f857
push 0x4c
push 0
call edi
mov dword [esi + 0xd0], eax
test eax, eax
je 0x41f819
push 0x4c
push 0
push eax
call sub.MSVCR100.dll_memset
mov eax, dword [esi + 0xd0]
mov dword [eax + 8], 0xf
mov ecx, dword [esi + 0xd0]
add esp, 0xc
mov byte [ecx + 0x48], 7
mov edx, dword [esi + 0xd0]
push 0x2d00
push 0
mov byte [edx + 0x44], 0
call edi
mov ecx, dword [esi + 0xd0]
mov dword [ecx + 0x2c], eax
test eax, eax
je 0x41f819
push 0x8000
push 0
call edi
mov edx, dword [esi + 0xd0]
mov dword [edx + 0x30], eax
test eax, eax
jne 0x41f82d
mov dword [esi + 8], 2
call fcn.0041f710
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov eax, dword [esi + 0xd0]
mov ecx, dword [eax + 0x30]
add ecx, 0x8000
mov dword [eax + 0x34], ecx
mov eax, dword [esi + 0xd0]
mov edx, dword [eax + 0x30]
mov dword [eax + 0x3c], edx
mov eax, dword [esi + 0xd0]
mov ecx, dword [eax + 0x3c]
mov dword [eax + 0x38], ecx
mov ecx, dword [esi]
test cl, 8
je 0x41f888
mov edx, dword [ebx + 0x28]
mov dword [esi + 0x60], edx
mov eax, dword [ebx + 0x30]
mov dword [esi + 0x64], eax
mov edx, dword [ebx + 0x28]
mov dword [esi + 0x7a], edx
mov eax, dword [ebx + 0x2c]
mov dword [esi + 0x7e], eax
mov edx, dword [ebx + 0x30]
mov dword [esi + 0x82], edx
mov eax, dword [ebx + 0x34]
mov dword [esi + 0x86], eax
mov eax, dword [esi + 0x7e]
mov edx, dword [esi + 0x7a]
mov dword [esi + 0xe4], eax
mov eax, dword [esi + 0x86]
mov dword [esi + 0xec], eax
movzx eax, word [esi + 0x54]
mov dword [esi + 0xe0], edx
mov edx, dword [esi + 0x82]
mov dword [esi + 0xe8], edx
test al, 8
je 0x41f8bf
mov dl, byte [esi + 0x59]
jmp 0x41f8c2
mov dl, byte [esi + 0x5f]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov byte [esi + 0x108], dl
test cl, 4
je 0x41f8e4
mov edx, dword [esi + 0x8a]
mov edi, dword [esi + 0x8e]
jmp 0x41fa1d
test al, 1
je 0x41f99a
mov ebp, dword [esi + 0x48]
mov dword [esi + 0x100], 0xc
mov dword [esi + 0x104], 0
mov dword [esi + 0xf0], 0x12345678
mov dword [esi + 0xf4], 0x23456789
mov dword [esi + 0xf8], 0x34567890
test ebp, ebp
je 0x41f99a
mov dl, byte [ebp]
test dl, dl
je 0x41f99a
mov eax, dword [esi + 0xf0]
mov ecx, dword [esi + 0xf4]
mov edi, dword [esi + 0xf8]
mov edi, edi
movsx edx, dl
xor edx, eax
and edx, 0xff
shr eax, 8
mov dword [esp + 0x14], eax
mov eax, dword [edx*4 + 0x4d0b98]
xor eax, dword [esp + 0x14]
inc ebp
movzx edx, al
add ecx, edx
imul ecx, ecx, 0x8088405
inc ecx
mov edx, ecx
shr edx, 0x18
xor edx, edi
and edx, 0xff
shr edi, 8
mov dword [esi + 0xf0], eax
mov dword [esi + 0xf4], ecx
xor edi, dword [edx*4 + 0x4d0b98]
mov dword [esi + 0xf8], edi
mov dl, byte [ebp]
test dl, dl
jne 0x41f940
mov eax, dword [esi + 0x2c]
xor ecx, ecx
add eax, dword [esi + 0x8a]
adc ecx, dword [esi + 0x8e]
add eax, 0x1c
adc ecx, 0
test byte [esi], 1
jne 0x41f9ee
mov edx, dword [esi + 0xc]
push 0
xor edi, edi
add edx, eax
adc edi, ecx
mov ecx, dword [esi + 4]
lea eax, [esp + 0x1c]
push eax
push edi
push edx
push ecx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], edi
call ebx
test eax, eax
jne 0x41f9f4
mov dword [esi + 8], 7
call fcn.0041f710
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], ecx
mov eax, 2
lea edx, [esp + 0x14]
call fcn.0041ef20
test eax, eax
je 0x41f9da
movzx edx, word [esi + 0x68]
movzx eax, word [esp + 0x14]
mov ecx, dword [esi + 0x8a]
add edx, eax
lea edx, [edx + ecx + 0x1e]
xor edi, edi
test byte [esi], 1
jne 0x41fa4e
mov eax, dword [esi + 0xc]
xor ecx, ecx
add eax, edx
push 0
lea edx, [esp + 0x1c]
push edx
adc ecx, edi
push ecx
push eax
mov dword [esp + 0x28], eax
mov eax, dword [esi + 4]
push eax
mov dword [esp + 0x30], ecx
call ebx
test eax, eax
je 0x41f9da
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov dword [esi + 0x1c], edi
pop edi
mov dword [esi + 0x18], edx
pop esi
pop ebp
pop ebx
add esp, 0x14
ret