Function at 0x408a00
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Hash data with crc32
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5b0
mov eax, dword [0x411028]
xor eax, esp
mov dword [esp + 0x5ac], eax
mov eax, dword [ebp + 8]
push esi
xor esi, esi
push edi
mov dword [esp + 0xc], ecx
cmp dword [ebx + 0x14], esi
je 0x408a45
mov eax, 0x40000
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.00409c7a
mov esp, ebp
pop ebp
ret 4
cmp byte [ebx + 0x2c], 0
je 0x408a66
mov eax, 0x50000
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.00409c7a
mov esp, ebp
pop ebp
ret 4
mov dword [esp + 0x14], esi
cmp dword [ebx], esi
je 0x408a76
mov dword [esp + 0x14], 0xc
lea edx, [esp + 0x3a8]
sub edx, eax
nop
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, si
jne 0x408a80
cmp word [esp + 0x3a8], si
jne 0x408ab4
mov eax, 0x10000
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.00409c7a
mov esp, ebp
pop ebp
ret 4
lea eax, [esp + 0x3a8]
jmp 0x408ac0
cmp word [eax], 0x5c
jne 0x408ace
mov edx, 0x2f
mov word [eax], dx
add eax, 2
cmp word [eax], si
jne 0x408ac0
mov edi, 8
lea edx, [esp + 0x3a8]
mov dword [esp + 0x10], edi
call fcn.00407fd0
test al, al
je 0x408af5
mov dword [esp + 0x10], esi
mov edi, esi
mov eax, dword [esp + 0xc]
mov ecx, ebx
call fcn.004085c0
cmp eax, esi
jne 0x409257
push esi
push esi
push 0x104
lea eax, [esp + 0x16c]
push eax
push 0xffffffffffffffff
lea ecx, [esp + 0x3bc]
push ecx
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 0x408b43
sub eax, edx
mov dword [esp + 0x30], eax
xor edx, edx
mov eax, 0xb17
mov byte [esp + 0x264], cl
mov word [esp + 0x42], dx
mov edx, dword [ebx + 0x68]
mov word [esp + 0x18], ax
mov ecx, 0x14
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 + 0x1a], cx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], esi
mov word [esp + 0x1c], ax
cmp dword [ebx], esi
je 0x408bb2
mov eax, 9
mov word [esp + 0x1c], ax
mov word [esp + 0x44], ax
mov word [esp + 0x1e], di
cmp edi, esi
jne 0x408bd3
mov eax, dword [ebx + 0x70]
cmp eax, esi
jl 0x408bd3
mov ecx, dword [esp + 0x14]
add eax, ecx
mov dword [esp + 0x28], eax
jmp 0x408bd7
mov dword [esp + 0x28], esi
mov edx, dword [ebx + 0x70]
mov ecx, dword [ebx + 0x4c]
mov esi, dword [ebx + 0x58]
mov edi, dword [ebx + 0x5c]
mov dword [esp + 0x2c], edx
mov edx, dword [ebx + 0x18]
add edx, dword [ebx + 0x10]
xor eax, eax
mov word [esp + 0x40], ax
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], edx
mov dl, byte [ebx + 0x58]
lea ecx, [esp + 0x39c]
lea eax, [esp + 0x388]
mov dword [esp + 0x154], eax
mov dword [esp + 0x158], ecx
mov byte [esp + 0x38d], dl
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.0040a410
mov byte [esp + 0x38e], al
mov eax, esi
mov edx, edi
mov cl, 0x10
call fcn.0040a410
mov byte [esp + 0x38f], al
mov eax, esi
mov edx, edi
mov cl, 0x18
call fcn.0040a410
mov esi, dword [ebx + 0x50]
mov edi, dword [ebx + 0x54]
mov byte [esp + 0x390], al
mov al, byte [ebx + 0x50]
mov byte [esp + 0x391], al
mov eax, esi
mov edx, edi
mov cl, 8
call fcn.0040a410
mov byte [esp + 0x392], al
mov eax, esi
mov edx, edi
mov cl, 0x10
call fcn.0040a410
mov byte [esp + 0x393], al
mov eax, esi
mov edx, edi
mov cl, 0x18
call fcn.0040a410
movzx ecx, byte [ebx + 0x60]
mov esi, dword [ebx + 0x60]
mov edi, dword [ebx + 0x64]
mov byte [esp + 0x394], al
mov byte [esp + 0x395], cl
mov eax, esi
mov edx, edi
mov cl, 8
call fcn.0040a410
mov byte [esp + 0x396], al
mov eax, esi
mov edx, edi
mov cl, 0x10
call fcn.0040a410
mov byte [esp + 0x397], al
mov eax, esi
mov edx, edi
mov cl, 0x18
call fcn.0040a410
mov edx, dword [esp + 0x388]
mov byte [esp + 0x398], al
mov eax, dword [esp + 0x38c]
mov dword [esp + 0x39c], edx
mov dword [esp + 0x3a0], eax
movzx ecx, byte [esp + 0x390]
mov esi, ebx
lea edi, [esp + 0x18]
mov byte [esp + 0x3a4], cl
mov byte [esp + 0x39e], 5
call fcn.00407410
test eax, eax
je 0x408d7f
call fcn.00408830
mov eax, 0x400
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.00409c7a
mov esp, ebp
pop ebp
ret 4
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
lea ecx, [edx + eax + 0x1e]
add dword [ebx + 0x18], ecx
cmp dword [ebx + 0x14], 0
je 0x408db2
call fcn.00408830
mov eax, dword [ebx + 0x14]
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.00409c7a
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebx]
lea esi, [ebx + 0x30]
mov dword [esi], 0x12345678
mov dword [ebx + 0x34], 0x23456789
mov dword [ebx + 0x38], 0x34567890
test edi, edi
je 0x408de1
mov cl, byte [edi]
test cl, cl
je 0x408de1
mov edx, esi
call fcn.00407f80
add edi, 1
jne 0x408dcf
cmp byte [0x4115b4], 0
jne 0x408e04
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
xor edi, edi
call dword [sym.imp.MSVCR90.dll_rand]
sar eax, 7
mov byte [esp + edi + 0x37c], al
inc edi
cmp edi, 0xc
jl 0x408e06
mov edx, dword [esp + 0x20]
shr edx, 8
mov byte [esp + 0x387], dl
mov dword [esp + 0xc], 0
mov eax, dword [esp + 0xc]
mov cl, byte [esp + eax + 0x37c]
movsx ecx, cl
mov edi, dword [esi]
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x40c968]
mov dword [esp + 8], ecx
mov eax, dword [esi + 8]
shr edi, 8
xor dword [esp + 8], edi
mov ecx, dword [esp + 8]
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
and edx, 0xfffd
or edx, 2
shr eax, 8
xor eax, dword [ecx*4 + 0x40c968]
mov edi, dword [esi]
mov ecx, edx
xor ecx, 1
imul ecx, edx
shr ecx, 8
mov dword [esi + 8], eax
mov eax, dword [esp + 0xc]
xor cl, byte [esp + eax + 0x37c]
mov byte [esp + eax + 0x37c], cl
mov cl, byte [esp + eax + 0x37d]
movsx ecx, cl
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x40c968]
mov dword [esp + 8], ecx
mov eax, dword [esi + 8]
shr edi, 8
xor dword [esp + 8], edi
mov ecx, dword [esp + 8]
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
and edx, 0xfffd
mov edi, dword [esi]
or edx, 2
shr eax, 8
xor eax, dword [ecx*4 + 0x40c968]
mov ecx, edx
xor ecx, 1
imul ecx, edx
shr ecx, 8
mov dword [esi + 8], eax
mov eax, dword [esp + 0xc]
xor cl, byte [esp + eax + 0x37d]
mov byte [esp + eax + 0x37d], cl
mov cl, byte [esp + eax + 0x37e]
mov eax, dword [esi + 8]
movsx ecx, cl
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x40c968]
mov edx, eax
and edx, 0xfffd
mov dword [esp + 8], ecx
shr edi, 8
or edx, 2
xor dword [esp + 8], edi
mov ecx, dword [esp + 8]
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
shr eax, 8
xor eax, dword [ecx*4 + 0x40c968]
mov ecx, edx
xor ecx, 1
imul ecx, edx
shr ecx, 8
mov dword [esi + 8], eax
mov eax, dword [esp + 0xc]
xor cl, byte [esp + eax + 0x37e]
mov byte [esp + eax + 0x37e], cl
mov cl, byte [esp + eax + 0x37f]
movsx ecx, cl
xor ecx, edi
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x40c968]
mov dword [esp + 8], ecx
mov eax, dword [esi + 8]
shr edi, 8
xor dword [esp + 8], edi
mov ecx, dword [esp + 8]
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 + 0x40c968]
and edx, 0xfffd
or edx, 2
mov ecx, edx
xor ecx, 1
imul ecx, edx
mov dword [esi + 8], eax
mov eax, dword [esp + 0xc]
shr ecx, 8
xor cl, byte [esp + eax + 0x37f]
add eax, 4
cmp eax, 0xc
mov byte [esp + eax + 0x37b], cl
mov dword [esp + 0xc], eax
jl 0x408e32
cmp dword [ebx], 0
je 0x40905c
push 0xc
lea edx, [esp + 0x380]
push edx
mov ecx, ebx
call fcn.004083c0
add dword [ebx + 0x18], 0xc
xor eax, eax
xor esi, esi
cmp dword [ebx], esi
setne al
mov byte [ebx + 0x2d], al
mov eax, dword [esp + 0x10]
cmp eax, 8
jne 0x40907f
lea eax, [esp + 0x18]
push eax
mov edi, ebx
call fcn.00408890
jmp 0x40908a
test eax, eax
jne 0x40908c
mov eax, ebx
call fcn.004089a0
mov esi, eax
cmp byte [ebx + 0x80], 0
mov byte [ebx + 0x2d], 0
je 0x4090a7
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x4090a7
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx + 0x90]
mov eax, dword [ebx + 0x14]
mov edi, dword [ebx + 0x74]
add dword [ebx + 0x18], ecx
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x70], edi
test eax, eax
jne 0x409257
test esi, esi
jne 0x408d64
mov edx, dword [esp + 0x14]
lea eax, [ecx + edx]
cmp dword [esp + 0x28], eax
mov edx, dword [ebx + 0x78]
sete cl
cmp byte [ebx + 0x1c], 0
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edi
je 0x40916a
cmp dword [ebx], esi
jne 0x40916a
test byte [esp + 0x1c], 1
mov ax, word [esp + 0x10]
mov word [esp + 0x1e], ax
jne 0x409112
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 [ebx + 0x10]
mov eax, ebx
call fcn.00408510
test al, al
je 0x40914f
mov esi, ebx
lea edi, [esp + 0x18]
call fcn.00407410
test eax, eax
jne 0x408d64
mov edx, dword [ebx + 0x18]
mov eax, ebx
call fcn.00408510
test al, al
jne 0x4091b9
mov eax, 0x2000000
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.00409c7a
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esp + 0x10]
cmp word [esp + 0x1e], ax
je 0x409190
mov eax, 0x4000000
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.00409c7a
mov esp, ebp
pop ebp
ret 4
test eax, eax
jne 0x409198
test cl, cl
je 0x409175
mov esi, ebx
lea edi, [esp + 0x18]
call fcn.004076e0
test eax, eax
jne 0x408d64
mov ax, word [esp + 0x44]
add dword [ebx + 0x18], 0x10
mov word [esp + 0x1c], ax
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x409257
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 [ebx + 0x44]
add esp, 4
test ecx, ecx
jne 0x40922c
mov dword [ebx + 0x44], eax
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x5ac]
xor ecx, esp
call fcn.00409c7a
mov esp, ebp
pop ebp
ret 4
cmp dword [ecx + 0x35c], 0
je 0x40924f
jmp 0x409240
mov ecx, dword [ecx + 0x35c]
cmp dword [ecx + 0x35c], 0
jne 0x409240
mov dword [ecx + 0x35c], eax
xor eax, eax
mov ecx, dword [esp + 0x5b4]
pop edi
pop esi
xor ecx, esp
call fcn.00409c7a
mov esp, ebp
pop ebp
ret 4