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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5a0
push ebx
mov ebx, ecx
mov dword [ebp - 0x2c], ebx
cmp dword [ebx + 0x14], 0
je 0x404ad1
mov eax, 0x40000
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp byte [ebx + 0x2c], 0
je 0x404ae3
mov eax, 0x50000
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push esi
mov esi, dword [ebp + 0x14]
push edi
xor edi, edi
mov dword [ebp - 0x1c], edi
cmp dword [ebx], edi
je 0x404aff
cmp esi, 4
mov eax, 0xc
cmovne edi, eax
mov dword [ebp - 0x1c], edi
mov ecx, dword [ebp + 8]
lea edx, [ebp - 0x5a0]
sub edx, ecx
lea ebx, [ebx]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x404b10
cmp word [ebp - 0x5a0], ax
je 0x4051b2
lea eax, [ebp - 0x5a0]
mov ecx, 0x2f
cmp word [eax], 0x5c
jne 0x404b41
mov word [eax], cx
add eax, 2
cmp word [eax], 0
jne 0x404b38
cmp esi, 4
jne 0x404b80
lea ecx, [ebp - 0x5a0]
lea edx, [ecx + 2]
jmp 0x404b60
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404b60
sub ecx, edx
sar ecx, 1
cmp word [ebp + ecx*2 - 0x5a2], 0x2f
je 0x404b80
mov byte [ebp + 0xb], 1
jmp 0x404ba3
mov byte [ebp + 0xb], 0
mov dword [ebp - 4], 8
cmp esi, 4
je 0x404ba3
lea eax, [ebp - 0x5a0]
push eax
call fcn.00406880
add esp, 4
test al, al
je 0x404baa
mov dword [ebp - 4], 0
cmp esi, 2
jne 0x404bbb
push dword [ebp + 0xc]
mov ecx, ebx
call fcn.0040ae70
jmp 0x404bf3
cmp esi, 1
jne 0x404bcf
push dword [ebp + 0x10]
mov ecx, ebx
push dword [ebp + 0xc]
call fcn.0040af20
jmp 0x404bf3
cmp esi, 3
jne 0x404be3
push dword [ebp + 0x10]
mov ecx, ebx
push dword [ebp + 0xc]
call fcn.0040b070
jmp 0x404bf3
cmp esi, 4
jne 0x4051b2
mov ecx, ebx
call fcn.0040ad70
test eax, eax
jne 0x4051b7
push eax
push eax
push 0x104
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x360], al
lea eax, [ebp - 0x250]
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x5a0]
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea ecx, [ebp - 0x250]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404c31
sub ecx, edx
mov dword [ebp - 0x380], ecx
cmp byte [ebp + 0xb], al
je 0x404c6c
lea edi, [ebp - 0x250]
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x404c50
mov ax, word [0x54a3a4]
mov word [edi], ax
inc dword [ebp - 0x380]
mov edi, dword [ebp - 0x1c]
xor eax, eax
mov byte [ebp - 0x14c], 0
cmp dword [ebx], 0
mov word [ebp - 0x36e], ax
mov eax, dword [ebx + 0x68]
mov dword [ebp - 0x390], eax
mov eax, 8
mov dword [ebp - 0x254], 0
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 0x404cdd
cmp esi, 4
je 0x404cdd
mov eax, 9
mov word [ebp - 0x394], ax
mov word [ebp - 0x36c], ax
mov eax, dword [ebp - 4]
mov word [ebp - 0x392], ax
test eax, eax
jne 0x404d03
mov eax, dword [ebx + 0x70]
test eax, eax
js 0x404d03
add eax, edi
mov dword [ebp - 0x388], eax
jmp 0x404d0d
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 + 0x10]
add eax, dword [ebx + 0x18]
mov dword [ebp - 0x364], eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x25c], eax
lea eax, [ebp - 0x28]
mov edx, dword [ebx + 0x5c]
mov dword [ebp - 0x258], eax
mov al, byte [ebx + 0x58]
mov ecx, dword [ebx + 0x58]
mov byte [ebp - 0x13], al
mov eax, edx
shrd ecx, eax, 8
mov esi, dword [ebx + 0x50]
sar eax, 8
mov byte [ebp - 0x12], cl
mov eax, edx
mov ecx, dword [ebx + 0x58]
shrd ecx, eax, 0x10
mov dword [ebp - 0x18], 0xd5455
sar eax, 0x10
mov eax, dword [ebx + 0x58]
shrd eax, edx, 0x18
mov byte [ebp - 0x11], cl
mov ecx, esi
mov dword [ebp + 0xc], eax
mov byte [ebp - 0x10], al
mov al, byte [ebx + 0x50]
mov byte [ebp - 0xf], al
sar edx, 0x18
mov edx, dword [ebx + 0x54]
mov eax, edx
shrd ecx, eax, 8
mov byte [ebp - 0x14], 7
sar eax, 8
mov byte [ebp - 0xe], 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 - 0xd], cl
mov esi, dword [ebx + 0x60]
mov ecx, esi
shrd eax, edx, 0x18
mov dword [ebp - 0x378], 9
mov byte [ebp - 0xc], al
mov al, byte [ebx + 0x60]
mov byte [ebp - 0xb], al
sar edx, 0x18
mov edx, dword [ebx + 0x64]
mov eax, edx
shrd ecx, eax, 8
push 0x40c960
sar eax, 8
mov byte [ebp - 0xa], cl
mov eax, edx
mov ecx, esi
shrd ecx, eax, 0x10
sar eax, 0x10
mov eax, esi
mov byte [ebp - 9], cl
shrd eax, edx, 0x18
mov byte [ebp - 8], al
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0xc]
mov byte [ebp - 0x20], al
lea eax, [ebp - 0x398]
sar edx, 0x18
mov byte [ebp - 0x26], 5
push eax
call fcn.0040bbb0
add esp, 0xc
test eax, eax
je 0x404e48
mov ecx, ebx
call fcn.0040a7a0
pop edi
pop esi
mov eax, 0x400
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 0x404e73
mov ecx, ebx
call fcn.0040a7a0
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 0x404ea5
mov al, byte [esi]
test al, al
je 0x404ea5
push eax
push edi
call fcn.0040ca50
add esp, 8
add esi, 1
jne 0x404e90
cmp byte [0x5b314c], 0
jne 0x404ec8
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.api_ms_win_crt_utility_l1_1_0.dll_srand]
add esp, 4
xor esi, esi
lea ebx, [ebx]
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
sar eax, 7
mov byte [ebp + esi - 0x38], al
inc esi
cmp esi, 0xc
jl 0x404ed0
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 + 0xf], al
movsx eax, al
xor eax, dword [edi]
movzx eax, al
mov edx, dword [edi + 8]
mov esi, edx
shr ecx, 8
and esi, 0xfffd
or esi, 2
mov eax, dword [eax*4 + 0x549dd0]
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
movzx eax, al
xor edx, dword [eax*4 + 0x549dd0]
mov eax, esi
xor eax, 1
mov dword [edi + 8], edx
imul eax, esi
shr eax, 8
xor al, byte [ebp + 0xf]
mov byte [ebp + ebx - 0x38], al
inc ebx
cmp ebx, 0xc
jl 0x404ef1
mov ebx, dword [ebp - 0x2c]
mov esi, dword [ebp + 0x14]
cmp dword [ebx], 0
je 0x404f7c
cmp esi, 4
je 0x404f7c
push 0xc
lea eax, [ebp - 0x38]
mov ecx, ebx
push eax
call fcn.0040caa0
add dword [ebx + 0x18], 0xc
cmp dword [ebx], 0
mov dword [ebp + 0xc], 0
je 0x404f94
cmp esi, 4
je 0x404f94
mov eax, 1
jmp 0x404f96
xor eax, eax
mov edi, dword [ebp - 4]
mov byte [ebx + 0x2d], al
cmp esi, 4
je 0x404fc9
cmp edi, 8
jne 0x404fb9
lea eax, [ebp - 0x398]
mov ecx, ebx
push eax
call fcn.0040a800
mov dword [ebp + 0xc], eax
jmp 0x404fd3
test edi, edi
jne 0x404fd3
mov ecx, ebx
call fcn.0040a9e0
mov dword [ebp + 0xc], eax
jmp 0x404fd3
mov dword [ebx + 0x90], 0
cmp byte [ebx + 0x80], 0
mov byte [ebx + 0x2d], 0
je 0x404fee
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x404fee
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 0x4051b7
cmp dword [ebp + 0xc], eax
jne 0x404e3a
add ecx, dword [ebp - 0x1c]
cmp dword [ebp - 0x388], ecx
mov eax, dword [ebx + 0x78]
sete byte [ebp + 0xf]
mov dword [ebp - 0x38c], eax
cmp byte [ebx + 0x1c], 0
mov dword [ebp - 0x388], ecx
mov dword [ebp - 0x384], edx
je 0x4050c4
cmp dword [ebx], 0
je 0x40504e
cmp esi, 4
jne 0x4050c4
mov ax, word [ebp - 0x394]
mov word [ebp - 0x392], di
test al, 1
jne 0x40506f
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.0040b160
test al, al
je 0x4050b6
push ebx
lea eax, [ebp - 0x398]
push 0x40c960
push eax
call fcn.0040bbb0
add esp, 0xc
test eax, eax
jne 0x404e3a
push dword [ebx + 0x18]
mov ecx, ebx
call fcn.0040b160
test al, al
jne 0x405114
pop edi
pop esi
mov eax, 0x2000000
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp word [ebp - 0x392], di
jne 0x4050d7
test edi, edi
jne 0x4050e5
cmp byte [ebp + 0xf], 0
jne 0x4050e5
pop edi
pop esi
mov eax, 0x4000000
pop ebx
mov esp, ebp
pop ebp
ret 0x10
push ebx
lea eax, [ebp - 0x398]
push 0x40c960
push eax
call fcn.0040ba90
add esp, 0xc
test eax, eax
jne 0x404e3a
mov ax, word [ebp - 0x36c]
add dword [ebx + 0x18], 0x10
mov word [ebp - 0x394], ax
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x4051b7
push dword [ebp - 0x378]
call fcn.00546a00
push dword [ebp - 0x378]
mov esi, eax
push dword [ebp - 0x258]
push esi
call sub.VCRUNTIME140.dll_memcpy
push 0x360
mov dword [ebp - 0x258], esi
call fcn.005469cd
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, 0x14
test ecx, ecx
jne 0x405177
pop edi
pop esi
mov dword [ebx + 0x44], edx
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ecx + 0x35c], 0
lea eax, [ecx + 0x35c]
je 0x4051a1
jmp 0x405190
mov ecx, dword [eax]
cmp dword [ecx + 0x35c], 0
lea eax, [ecx + 0x35c]
jne 0x405190
pop edi
pop esi
mov dword [ecx + 0x35c], edx
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, 0x10000
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10