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

Disassembly:
sub esp, 0x7b4
mov eax, dword [0x100ef07c]
xor eax, esp
mov dword [esp + 0x7ac], eax
mov eax, dword [esp + 0x7bc]
push ebx
push ebp
mov ebp, dword [esp + 0x7c0]
push esi
xor esi, esi
push edi
mov ebx, ecx
cmp dword [ebp + 0x14], esi
je 0x1002b019
mov eax, 0x40000
jmp 0x1002b758
cmp byte [ebp + 0x2c], 0
je 0x1002b029
mov eax, 0x50000
jmp 0x1002b758
mov dword [esp + 0x10], esi
cmp dword [ebp], esi
je 0x1002b03a
mov dword [esp + 0x10], 0xc
lea edx, [esp + 0x3a8]
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, si
jne 0x1002b043
cmp word [esp + 0x3a8], si
jne 0x1002b066
mov eax, 0x10000
jmp 0x1002b758
lea eax, [esp + 0x3a8]
lea ecx, [ecx]
cmp word [eax], 0x5c
jne 0x1002b07e
mov ecx, 0x2f
mov word [eax], cx
add eax, 2
cmp word [eax], si
jne 0x1002b070
mov edi, 8
lea edx, [esp + 0x3a8]
mov dword [esp + 0x14], edi
call fcn.1002a5b0
test al, al
je 0x1002b0a5
mov dword [esp + 0x14], esi
mov edi, esi
mov eax, ebx
mov ecx, ebp
call fcn.1002aba0
cmp eax, esi
jne 0x1002b758
push esi
push esi
push 0x104
lea edx, [esp + 0x16c]
push edx
push 0xffffffffffffffff
lea eax, [esp + 0x3bc]
push eax
push esi
push 0xfde9
mov dword [esp + 0x394], esi
mov byte [esp + 0x70], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [esp + 0x160]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1002b0f1
sub eax, edx
mov dword [esp + 0x30], eax
mov byte [esp + 0x264], cl
xor ecx, ecx
mov eax, 0x14
mov word [esp + 0x42], cx
mov ecx, dword [ebp + 0x68]
mov word [esp + 0x1a], ax
mov edx, 0xb17
mov eax, 8
mov dword [esp + 0x15c], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x368], 1
mov dword [esp + 0x370], esi
mov word [esp + 0x18], dx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], esi
mov word [esp + 0x1c], ax
cmp dword [ebp], esi
je 0x1002b161
mov eax, 9
mov word [esp + 0x1c], ax
mov word [esp + 0x44], ax
mov word [esp + 0x1e], di
cmp edi, esi
jne 0x1002b182
mov eax, dword [ebp + 0x70]
cmp eax, esi
jl 0x1002b182
mov edx, dword [esp + 0x10]
add eax, edx
mov dword [esp + 0x28], eax
jmp 0x1002b186
mov dword [esp + 0x28], esi
mov eax, dword [ebp + 0x70]
mov edx, dword [ebp + 0x4c]
mov esi, dword [ebp + 0x58]
mov edi, dword [ebp + 0x5c]
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 0x18]
add eax, dword [ebp + 0x10]
xor ecx, ecx
mov word [esp + 0x40], cx
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], eax
mov al, byte [ebp + 0x58]
lea ecx, [esp + 0x388]
lea edx, [esp + 0x39c]
mov dword [esp + 0x154], ecx
mov dword [esp + 0x158], edx
mov byte [esp + 0x38d], al
mov eax, esi
mov edx, edi
mov cl, 8
mov dword [esp + 0x34], 0x11
mov dword [esp + 0x38], 9
mov byte [esp + 0x388], 0x55
mov byte [esp + 0x389], 0x54
mov byte [esp + 0x38a], 0xd
mov byte [esp + 0x38b], 0
mov byte [esp + 0x38c], 7
call fcn.100c1ce0
mov byte [esp + 0x38e], al
mov eax, esi
mov edx, edi
mov cl, 0x10
call fcn.100c1ce0
mov byte [esp + 0x38f], al
mov eax, esi
mov edx, edi
mov cl, 0x18
call fcn.100c1ce0
mov cl, byte [ebp + 0x50]
mov esi, dword [ebp + 0x50]
mov edi, dword [ebp + 0x54]
mov bl, al
mov byte [esp + 0x391], cl
mov eax, esi
mov edx, edi
mov cl, 8
mov byte [esp + 0x390], bl
call fcn.100c1ce0
mov byte [esp + 0x392], al
mov eax, esi
mov edx, edi
mov cl, 0x10
call fcn.100c1ce0
mov byte [esp + 0x393], al
mov eax, esi
mov edx, edi
mov cl, 0x18
call fcn.100c1ce0
mov dl, byte [ebp + 0x60]
mov esi, dword [ebp + 0x60]
mov edi, dword [ebp + 0x64]
mov byte [esp + 0x394], al
mov byte [esp + 0x395], dl
mov eax, esi
mov edx, edi
mov cl, 8
call fcn.100c1ce0
mov byte [esp + 0x396], al
mov eax, esi
mov edx, edi
mov cl, 0x10
call fcn.100c1ce0
mov byte [esp + 0x397], al
mov eax, esi
mov edx, edi
mov cl, 0x18
call fcn.100c1ce0
mov ecx, dword [esp + 0x38c]
mov byte [esp + 0x398], al
mov eax, dword [esp + 0x388]
mov dword [esp + 0x39c], eax
mov esi, ebp
lea edi, [esp + 0x18]
mov dword [esp + 0x3a0], ecx
mov byte [esp + 0x3a4], bl
mov byte [esp + 0x39e], 5
call fcn.100299f0
test eax, eax
je 0x1002b316
call fcn.1002ae10
mov eax, 0x400
jmp 0x1002b758
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
lea ecx, [edx + eax + 0x1e]
add dword [ebp + 0x18], ecx
cmp dword [ebp + 0x14], 0
je 0x1002b338
call fcn.1002ae10
mov eax, dword [ebp + 0x14]
jmp 0x1002b758
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 0x1002b368
mov cl, byte [edi]
test cl, cl
je 0x1002b368
mov edx, esi
call fcn.1002a560
add edi, 1
jne 0x1002b356
cmp byte [0x100f254b], 0
jne 0x1002b38b
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.MSVCR90.dll_srand]
add esp, 4
mov ebx, dword [sym.imp.MSVCR90.dll_rand]
xor edi, edi
call ebx
sar eax, 7
mov byte [esp + edi + 0x37c], al
inc edi
cmp edi, 0xc
jl 0x1002b393
mov edx, dword [esp + 0x20]
shr edx, 8
mov byte [esp + 0x387], dl
xor ebx, ebx
jmp 0x1002b3c0
mov cl, byte [esp + ebx + 0x37c]
movsx ecx, cl
mov edi, dword [esi]
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x100d1ed0]
mov eax, dword [esi + 8]
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
xor ecx, eax
and ecx, 0xff
mov edx, eax
shr eax, 8
xor eax, dword [ecx*4 + 0x100d1ed0]
mov cl, byte [esp + ebx + 0x37d]
movsx ecx, cl
xor ecx, edi
and ecx, 0xff
mov dword [esi + 8], eax
mov ecx, dword [ecx*4 + 0x100d1ed0]
and edx, 0xfffd
or edx, 2
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
mov edi, dword [esi]
inc ecx
mov dword [esi + 4], ecx
shr eax, 8
xor al, byte [esp + ebx + 0x37c]
shr ecx, 0x18
mov byte [esp + ebx + 0x37c], al
mov eax, dword [esi + 8]
xor ecx, eax
and ecx, 0xff
mov edx, eax
shr eax, 8
xor eax, dword [ecx*4 + 0x100d1ed0]
mov cl, byte [esp + ebx + 0x37e]
movsx ecx, cl
xor ecx, edi
and ecx, 0xff
mov dword [esi + 8], eax
mov ecx, dword [ecx*4 + 0x100d1ed0]
and edx, 0xfffd
or edx, 2
mov eax, edx
shr edi, 8
xor ecx, edi
mov dword [esi], ecx
xor eax, 1
imul eax, edx
movzx ecx, cl
add ecx, dword [esi + 4]
shr eax, 8
xor al, byte [esp + ebx + 0x37d]
imul ecx, ecx, 0x8088405
inc ecx
mov byte [esp + ebx + 0x37d], al
mov eax, dword [esi + 8]
mov dword [esi + 4], ecx
mov edx, eax
shr ecx, 0x18
and edx, 0xfffd
xor ecx, eax
or edx, 2
and ecx, 0xff
mov edi, dword [esi]
shr eax, 8
xor eax, dword [ecx*4 + 0x100d1ed0]
mov cl, byte [esp + ebx + 0x37f]
movsx ecx, cl
mov dword [esi + 8], eax
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x100d1ed0]
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 + 0x37e]
inc ecx
mov byte [esp + ebx + 0x37e], 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 + 0x100d1ed0]
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 + 0x37f]
add ebx, 4
cmp ebx, 0xc
mov byte [esp + ebx + 0x37b], al
jl 0x1002b3c0
cmp dword [ebp], 0
je 0x1002b5ab
push 0xc
lea ecx, [esp + 0x380]
push ecx
mov ecx, ebp
call fcn.1002a9a0
add dword [ebp + 0x18], 0xc
mov ebx, dword [esp + 0x14]
xor esi, esi
xor eax, eax
cmp dword [ebp], esi
setne al
mov byte [ebp + 0x2d], al
cmp ebx, 8
jne 0x1002b5cf
lea edx, [esp + 0x18]
push edx
mov edi, ebp
call fcn.1002ae70
jmp 0x1002b5da
test ebx, ebx
jne 0x1002b5dc
mov eax, ebp
call fcn.1002af80
mov esi, eax
cmp byte [ebp + 0x80], 0
mov byte [ebp + 0x2d], 0
je 0x1002b5f7
mov eax, dword [ebp + 0x7c]
test eax, eax
je 0x1002b5f7
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 0x1002b758
test esi, esi
jne 0x1002b30c
mov eax, dword [esp + 0x10]
mov esi, dword [ebp + 0x78]
add eax, edx
cmp dword [esp + 0x28], eax
mov dword [esp + 0x24], esi
sete dl
cmp byte [ebp + 0x1c], 0
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
je 0x1002b6a5
cmp dword [ebp], 0
jne 0x1002b6a5
test byte [esp + 0x1c], 1
mov word [esp + 0x1e], bx
jne 0x1002b65e
mov ecx, 0xfff7
and word [esp + 0x1c], cx
mov dx, word [esp + 0x1c]
mov word [esp + 0x44], dx
mov edx, dword [esp + 0x4c]
sub edx, dword [ebp + 0x10]
mov eax, ebp
call fcn.1002aaf0
test al, al
je 0x1002b69b
mov esi, ebp
lea edi, [esp + 0x18]
call fcn.100299f0
test eax, eax
jne 0x1002b30c
mov edx, dword [ebp + 0x18]
mov eax, ebp
call fcn.1002aaf0
test al, al
jne 0x1002b6df
mov eax, 0x2000000
jmp 0x1002b758
cmp word [esp + 0x1e], bx
je 0x1002b6b6
mov eax, 0x4000000
jmp 0x1002b758
test ebx, ebx
jne 0x1002b6be
test dl, dl
je 0x1002b6ac
mov esi, ebp
lea edi, [esp + 0x18]
call fcn.10029cc0
test eax, eax
jne 0x1002b30c
mov ax, word [esp + 0x44]
add dword [ebp + 0x18], 0x10
mov word [esp + 0x1c], ax
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x1002b758
mov ecx, dword [esp + 0x38]
push ecx
call sub.mfc90u.dll_new__
mov edx, dword [esp + 0x3c]
add esp, 4
mov esi, eax
mov eax, dword [esp + 0x158]
push edx
push eax
push esi
call sub.MSVCR90.dll_memcpy
add esp, 0xc
push 0x360
mov dword [esp + 0x15c], esi
call sub.mfc90u.dll_new
mov ecx, 0xd8
lea esi, [esp + 0x1c]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp + 0x44]
add esp, 4
test ecx, ecx
jne 0x1002b738
mov dword [ebp + 0x44], eax
jmp 0x1002b756
cmp dword [ecx + 0x35c], 0
je 0x1002b750
mov ecx, dword [ecx + 0x35c]
cmp dword [ecx + 0x35c], 0
jne 0x1002b741
mov dword [ecx + 0x35c], eax
xor eax, eax
mov ecx, dword [esp + 0x7bc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100c09bd
add esp, 0x7b4
ret 8