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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4a4
push ebx
mov ebx, ecx
push esi
push edi
mov dword [ebp - 0x2c], ebx
cmp dword [ebx + 0x14], 0
je 0x10041375
mov eax, 0x40000
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp byte [ebx + 0x2c], 0
je 0x10041389
mov eax, 0x50000
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push dword [ebp + 8]
mov edi, dword [sym.imp.MSVCR120.dll_strcpy_s]
xor eax, eax
cmp dword [ebx], eax
mov ecx, 0xc
push 0x104
cmovne eax, ecx
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x4a0]
push eax
call edi
add esp, 0xc
cmp byte [ebp - 0x4a0], 0
jne 0x100413c9
mov eax, 0x10000
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
lea eax, [ebp - 0x4a0]
nop
cmp byte [eax], 0x5c
jne 0x100413d8
mov byte [eax], 0x2f
inc eax
cmp byte [eax], 0
jne 0x100413d0
lea ecx, [ebp - 0x4a0]
mov esi, 8
call fcn.10042540
push dword [ebp + 0xc]
xor ecx, ecx
test al, al
cmovne esi, ecx
mov ecx, ebx
mov dword [ebp - 0x28], esi
call fcn.10041ee0
test eax, eax
jne 0x10041949
push 0x10053860
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x360]
push 0x104
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x4a0]
push eax
lea eax, [ebp - 0x250]
push 0x104
push eax
call edi
lea ecx, [ebp - 0x250]
add esp, 0xc
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10041444
push 0x10053860
lea eax, [ebp - 0x14c]
sub ecx, edx
push 0x104
push eax
mov dword [ebp - 0x380], ecx
call edi
xor eax, eax
mov dword [ebp - 0x254], 0
mov word [ebp - 0x36e], ax
add esp, 0xc
cmp dword [ebx], 0
mov eax, dword [ebx + 0x68]
mov dword [ebp - 0x390], eax
mov eax, 8
mov dword [ebp - 0x374], 0
mov dword [ebp - 0x48], 1
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x398], 0x140b17
mov dword [ebp - 0x38c], 0
mov word [ebp - 0x394], ax
je 0x100414ce
mov eax, 9
mov word [ebp - 0x394], ax
mov word [ebp - 0x36c], ax
mov word [ebp - 0x392], si
test esi, esi
jne 0x100414f4
mov ecx, dword [ebx + 0x70]
test ecx, ecx
js 0x100414f4
mov eax, dword [ebp - 0x18]
add eax, ecx
mov dword [ebp - 0x388], eax
jmp 0x100414fe
mov dword [ebp - 0x388], 0
mov eax, dword [ebx + 0x70]
mov dword [ebp - 0x384], eax
xor eax, eax
mov word [ebp - 0x370], ax
mov eax, dword [ebx + 0x4c]
mov dword [ebp - 0x368], eax
mov eax, dword [ebx + 0x18]
add eax, dword [ebx + 0x10]
mov dword [ebp - 0x364], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x25c], eax
lea eax, [ebp - 0x24]
mov edx, dword [ebx + 0x5c]
mov dword [ebp - 0x258], eax
mov al, byte [ebx + 0x58]
mov ecx, dword [ebx + 0x58]
mov byte [ebp - 0xf], al
mov eax, edx
shrd ecx, eax, 8
mov esi, dword [ebx + 0x50]
sar eax, 8
mov byte [ebp - 0xe], cl
mov eax, edx
mov ecx, dword [ebx + 0x58]
shrd ecx, eax, 0x10
mov dword [ebp - 0x14], 0xd5455
sar eax, 0x10
mov eax, dword [ebx + 0x58]
shrd eax, edx, 0x18
mov byte [ebp - 0xd], cl
mov ecx, esi
mov dword [ebp + 8], eax
mov byte [ebp - 0xc], al
mov al, byte [ebx + 0x50]
mov byte [ebp - 0xb], al
sar edx, 0x18
mov edx, dword [ebx + 0x54]
mov eax, edx
shrd ecx, eax, 8
mov byte [ebp - 0x10], 7
sar eax, 8
mov byte [ebp - 0xa], cl
mov eax, edx
mov ecx, esi
mov dword [ebp - 0x37c], 0x11
shrd ecx, eax, 0x10
push ebx
sar eax, 0x10
mov eax, esi
mov byte [ebp - 9], cl
mov esi, dword [ebx + 0x60]
mov ecx, esi
shrd eax, edx, 0x18
mov dword [ebp - 0x378], 9
mov byte [ebp - 8], al
mov al, byte [ebx + 0x60]
mov byte [ebp - 7], al
sar edx, 0x18
mov edx, dword [ebx + 0x64]
mov eax, edx
shrd ecx, eax, 8
sar eax, 8
mov byte [ebp - 6], cl
mov eax, edx
mov ecx, esi
shrd ecx, eax, 0x10
sar eax, 0x10
mov eax, esi
mov byte [ebp - 5], cl
shrd eax, edx, 0x18
lea ecx, [ebp - 0x398]
mov byte [ebp - 4], al
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 8]
sar edx, 0x18
mov byte [ebp - 0x1c], al
mov byte [ebp - 0x22], 5
call fcn.10042f00
add esp, 4
test eax, eax
je 0x10041633
mov ecx, ebx
call fcn.10041b00
mov eax, 0x400
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp - 0x37c]
add eax, 0x1e
add eax, dword [ebp - 0x380]
add dword [ebx + 0x18], eax
cmp dword [ebx + 0x14], 0
je 0x1004165e
mov ecx, ebx
call fcn.10041b00
mov eax, dword [ebx + 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
lea edi, [ebx + 0x30]
mov dword [ebx + 0x34], 0x23456789
mov dword [edi], 0x12345678
mov dword [ebx + 0x38], 0x34567890
mov esi, dword [ebx]
test esi, esi
je 0x10041690
jmp 0x10041680
mov dl, byte [esi]
test dl, dl
je 0x10041690
mov ecx, edi
call fcn.10042690
inc esi
jne 0x10041680
cmp byte [0x1006ef94], 0
jne 0x100416b3
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor esi, eax
push esi
call dword [sym.imp.MSVCR120.dll_srand]
add esp, 4
xor esi, esi
call dword [sym.imp.MSVCR120.dll_rand]
sar eax, 7
mov byte [ebp + esi - 0x38], al
inc esi
cmp esi, 0xc
jl 0x100416b5
mov eax, dword [ebp - 0x390]
shr eax, 8
xor ebx, ebx
mov byte [ebp - 0x2d], al
mov al, byte [ebp + ebx - 0x38]
mov ecx, dword [edi]
mov byte [ebp + 0xb], al
movsx eax, al
xor eax, ecx
mov edx, dword [edi + 8]
and eax, 0xff
shr ecx, 8
mov esi, edx
and esi, 0xfffd
or esi, 2
mov eax, dword [eax*4 + 0x100596d0]
xor eax, ecx
mov dword [edi], eax
movzx eax, al
add eax, dword [edi + 4]
imul eax, eax, 0x8088405
inc eax
mov dword [edi + 4], eax
shr eax, 0x18
xor eax, edx
shr edx, 8
and eax, 0xff
xor edx, dword [eax*4 + 0x100596d0]
mov eax, esi
xor eax, 1
mov dword [edi + 8], edx
imul eax, esi
shr eax, 8
xor al, byte [ebp + 0xb]
mov byte [ebp + ebx - 0x38], al
inc ebx
cmp ebx, 0xc
jl 0x100416d6
mov ebx, dword [ebp - 0x2c]
cmp dword [ebx], 0
je 0x1004175d
push 0xc
lea eax, [ebp - 0x38]
mov ecx, ebx
push eax
call fcn.10042070
add dword [ebx + 0x18], 0xc
mov esi, dword [ebp - 0x28]
xor eax, eax
xor edi, edi
cmp dword [ebx], eax
setne al
mov byte [ebx + 0x2d], al
cmp esi, 8
jne 0x10041781
lea eax, [ebp - 0x398]
mov ecx, ebx
push eax
call fcn.100419d0
jmp 0x1004178c
test esi, esi
jne 0x1004178e
mov ecx, ebx
call fcn.10041960
mov edi, eax
cmp byte [ebx + 0x80], 0
mov byte [ebx + 0x2d], 0
je 0x100417a9
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x100417a9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx + 0x90]
add dword [ebx + 0x18], ecx
mov eax, dword [ebx + 0x14]
mov edx, dword [ebx + 0x74]
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x70], edx
test eax, eax
jne 0x10041949
test edi, edi
jne 0x10041625
add ecx, dword [ebp - 0x18]
cmp dword [ebp - 0x388], ecx
mov eax, dword [ebx + 0x78]
sete byte [ebp + 0xb]
mov dword [ebp - 0x38c], eax
cmp byte [ebx + 0x1c], 0
mov dword [ebp - 0x388], ecx
mov dword [ebp - 0x384], edx
je 0x1004186e
cmp dword [ebx], edi
jne 0x1004186e
mov ax, word [ebp - 0x394]
mov word [ebp - 0x392], si
test al, 1
jne 0x1004181f
mov ecx, 0xfff7
and ax, cx
mov word [ebp - 0x394], ax
mov word [ebp - 0x36c], ax
mov ecx, ebx
mov eax, dword [ebp - 0x364]
sub eax, dword [ebx + 0x10]
push eax
call fcn.10042000
test al, al
je 0x10041860
push ebx
lea ecx, [ebp - 0x398]
call fcn.10042f00
add esp, 4
test eax, eax
jne 0x10041625
push dword [ebx + 0x18]
mov ecx, ebx
call fcn.10042000
test al, al
jne 0x100418b8
mov eax, 0x2000000
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp word [ebp - 0x392], si
je 0x10041885
mov eax, 0x4000000
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
test esi, esi
jne 0x1004188f
cmp byte [ebp + 0xb], 0
je 0x10041877
push ebx
lea ecx, [ebp - 0x398]
call fcn.10042db0
add esp, 4
test eax, eax
jne 0x10041625
mov ax, word [ebp - 0x36c]
add dword [ebx + 0x18], 0x10
mov word [ebp - 0x394], ax
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x10041949
push dword [ebp - 0x378]
mov edi, dword [sym.imp.MSVCR120.dll_void____cdecl_operator_new_unsigned_int_]
call edi
add esp, 4
mov esi, eax
push dword [ebp - 0x378]
push dword [ebp - 0x258]
push esi
call sub.MSVCR120.dll_memcpy
add esp, 0xc
mov dword [ebp - 0x258], esi
push 0x360
call edi
mov edx, eax
lea esi, [ebp - 0x398]
mov ecx, 0xd8
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x44]
add esp, 4
test ecx, ecx
jne 0x10041921
mov dword [ebx + 0x44], edx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ecx + 0x35c], 0
lea eax, [ecx + 0x35c]
je 0x10041941
mov ecx, dword [eax]
cmp dword [ecx + 0x35c], 0
lea eax, [ecx + 0x35c]
jne 0x10041930
mov dword [ecx + 0x35c], edx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10