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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4b4
mov eax, dword [0x40f008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, ecx
mov dword [ebp - 0x4a4], eax
push esi
push edi
cmp dword [ebx + 0x14], 0
je 0x40991f
mov eax, 0x40000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a67e
mov esp, ebp
pop ebp
ret 0x10
cmp byte [ebx + 0x2c], 0
je 0x40993d
mov eax, 0x50000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a67e
mov esp, ebp
pop ebp
ret 0x10
mov edi, dword [ebx]
lea edx, [ebp - 0x138]
mov ecx, dword [ebp + 8]
neg edi
sbb edi, edi
and edi, 0xc
sub edx, ecx
mov dword [ebp - 0x4b0], edi
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ecx + edx - 1], al
test al, al
jne 0x409957
mov cl, byte [ebp - 0x138]
test cl, cl
jne 0x409986
mov eax, 0x10000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a67e
mov esp, ebp
pop ebp
ret 0x10
lea eax, [ebp - 0x138]
nop dword [eax]
cmp cl, 0x5c
jne 0x409998
mov byte [eax], 0x2f
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x409990
lea ecx, [ebp - 0x138]
mov dword [ebp - 0x4a8], 8
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4099b3
sub ecx, edx
lea esi, [ebp - 0x138]
add esi, ecx
lea eax, [ebp - 0x138]
cmp esi, eax
jbe 0x4099e0
nop
cmp byte [esi], 0x2e
je 0x4099e0
dec esi
lea eax, [ebp - 0x138]
cmp esi, eax
ja 0x4099d0
lea eax, [ebp - 0x138]
cmp esi, eax
jne 0x4099f3
cmp byte [esi], 0x2e
jne 0x409a81
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
push 0x40cc88
push esi
call edi
add esp, 8
test eax, eax
je 0x409a71
push str..zip
push esi
call edi
add esp, 8
test eax, eax
je 0x409a71
push str..zoo
push esi
call edi
add esp, 8
test eax, eax
je 0x409a71
push str..arc
push esi
call edi
add esp, 8
test eax, eax
je 0x409a71
push str..lzh
push esi
call edi
add esp, 8
test eax, eax
je 0x409a71
push str..arj
push esi
call edi
add esp, 8
test eax, eax
je 0x409a71
push 0x40ccb4
push esi
call edi
add esp, 8
test eax, eax
je 0x409a71
push str..tgz
push esi
call edi
add esp, 8
test eax, eax
jne 0x409a7b
mov dword [ebp - 0x4a8], 0
mov edi, dword [ebp - 0x4b0]
mov eax, dword [ebp - 0x4a4]
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x84], 0
mov byte [ebx + 0x80], 0
mov dword [ebx + 0x78], 0
mov dword [ebx + 0x70], 0
mov dword [ebx + 0x90], 0
mov dword [ebx + 0x74], 0
test eax, eax
jne 0x409adc
mov esi, 0x10000
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a67e
mov esp, ebp
pop ebp
ret 0x10
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x4a4], eax
cmp eax, 0xffffffff
jne 0x409b17
mov esi, 0x200
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a67e
mov esp, ebp
pop ebp
ret 0x10
push ecx
push eax
mov ecx, ebx
call fcn.00409310
mov esi, eax
test esi, esi
je 0x409b47
push dword [ebp - 0x4a4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a67e
mov esp, ebp
pop ebp
ret 0x10
mov byte [ebx + 0x80], 1
xor ecx, ecx
mov dword [ebp - 0x13c], 0
mov byte [ebp - 0x460], 0
mov al, byte [ebp + ecx - 0x138]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x351], al
test al, al
jne 0x409b61
lea ecx, [ebp - 0x350]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409b80
mov byte [ebp - 0x24c], al
sub ecx, edx
xor eax, eax
mov dword [ebp - 0x480], ecx
cmp dword [ebx], 0
mov word [ebp - 0x46e], ax
mov eax, dword [ebx + 0x68]
mov dword [ebp - 0x490], eax
mov eax, 8
mov dword [ebp - 0x354], 0
mov dword [ebp - 0x474], 0
mov dword [ebp - 0x148], 1
mov dword [ebp - 0x140], 0
mov dword [ebp - 0x498], 0x140b17
mov dword [ebp - 0x48c], 0
mov word [ebp - 0x494], ax
je 0x409c00
mov eax, 9
mov word [ebp - 0x494], ax
mov word [ebp - 0x46c], ax
mov eax, dword [ebp - 0x4a8]
movzx ecx, ax
mov dword [ebp - 0x4a4], ecx
mov word [ebp - 0x492], cx
mov ecx, dword [ebx + 0x70]
test eax, eax
jne 0x409c33
test ecx, ecx
js 0x409c33
lea eax, [ecx + edi]
mov dword [ebp - 0x488], eax
jmp 0x409c3d
mov dword [ebp - 0x488], 0
xor eax, eax
mov edx, dword [ebx + 0x5c]
mov word [ebp - 0x470], ax
mov eax, dword [ebx + 0x4c]
mov dword [ebp - 0x468], eax
mov eax, dword [ebx + 0x18]
add eax, dword [ebx + 0x10]
mov dword [ebp - 0x464], eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x35c], eax
lea eax, [ebp - 0x24]
mov dword [ebp - 0x358], eax
movzx eax, byte [ebx + 0x58]
mov byte [ebp - 0x13], al
mov eax, edx
mov dword [ebp - 0x484], ecx
mov ecx, dword [ebx + 0x58]
shrd ecx, eax, 8
mov dword [ebp - 0x18], 0xd5455
mov byte [ebp - 0x12], cl
mov ecx, dword [ebx + 0x58]
shrd ecx, eax, 0x10
mov eax, dword [ebx + 0x58]
shrd eax, edx, 0x18
mov edx, dword [ebx + 0x54]
mov dword [ebp - 0x4ac], eax
mov byte [ebp - 0x10], al
movzx eax, byte [ebx + 0x50]
mov byte [ebp - 0xf], al
mov eax, edx
mov byte [ebp - 0x11], cl
mov ecx, dword [ebx + 0x50]
shrd ecx, eax, 8
mov byte [ebp - 0x14], 7
mov byte [ebp - 0xe], cl
mov ecx, dword [ebx + 0x50]
shrd ecx, eax, 0x10
mov eax, dword [ebx + 0x50]
movq xmm0, qword [ebp - 0x18]
shrd eax, edx, 0x18
mov edx, dword [ebx + 0x64]
mov byte [ebp - 0xc], al
movzx eax, byte [ebx + 0x60]
mov byte [ebp - 0xb], al
mov eax, edx
mov byte [ebp - 0xd], cl
mov ecx, dword [ebx + 0x60]
shrd ecx, eax, 8
movq qword [ebp - 0x24], xmm0
mov byte [ebp - 0xa], cl
mov ecx, dword [ebx + 0x60]
shrd ecx, eax, 0x10
mov eax, dword [ebx + 0x60]
shrd eax, edx, 0x18
mov byte [ebp - 9], cl
lea ecx, [ebp - 0x498]
mov byte [ebp - 8], al
mov eax, dword [ebp - 0x4ac]
push ebx
mov dword [ebp - 0x47c], 0x11
mov dword [ebp - 0x478], 9
mov byte [ebp - 0x1c], al
mov byte [ebp - 0x22], 5
call fcn.00408590
add esp, 4
test eax, eax
je 0x409d7c
cmp byte [ebx + 0x80], 0
je 0x409d57
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x409d57
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebx + 0x74]
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x70], eax
mov eax, 0x400
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a67e
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp - 0x480]
add eax, 0x1e
add eax, dword [ebp - 0x47c]
add dword [ebx + 0x18], eax
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x409dcf
cmp byte [ebx + 0x80], 0
je 0x409daf
mov ecx, dword [ebx + 0x7c]
test ecx, ecx
je 0x409daf
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebx + 0x14]
mov ecx, dword [ebx + 0x74]
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x70], ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a67e
mov esp, ebp
pop ebp
ret 0x10
mov dword [ebx + 0x30], 0x12345678
mov dword [ebx + 0x34], 0x23456789
mov dword [ebx + 0x38], 0x34567890
mov edx, dword [ebx]
test edx, edx
je 0x409e3d
nop word [eax + eax]
mov al, byte [edx]
test al, al
je 0x409e3d
mov ecx, dword [ebx + 0x30]
movsx eax, al
xor eax, ecx
shr ecx, 8
movzx eax, al
mov eax, dword [eax*4 + 0x40c448]
xor eax, ecx
mov ecx, dword [ebx + 0x38]
mov dword [ebx + 0x30], eax
movzx eax, al
add eax, dword [ebx + 0x34]
imul eax, eax, 0x8088405
inc eax
mov dword [ebx + 0x34], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x40c448]
mov dword [ebx + 0x38], ecx
add edx, 1
jne 0x409df0
cmp byte [0x410560], 0
jne 0x409e60
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
mov edi, dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
xor esi, esi
call edi
sar eax, 7
mov byte [ebp + esi - 0x30], al
inc esi
cmp esi, 0xc
jl 0x409e68
mov eax, dword [ebp - 0x490]
shr eax, 8
xor edi, edi
mov byte [ebp - 0x25], al
nop word [eax + eax]
mov al, byte [ebp + edi - 0x30]
mov ecx, dword [ebx + 0x30]
mov byte [ebp - 0x499], al
movsx eax, al
xor eax, ecx
mov edx, dword [ebx + 0x38]
movzx eax, al
mov esi, edx
shr ecx, 8
and esi, 0xfffd
or esi, 2
mov eax, dword [eax*4 + 0x40c448]
xor eax, ecx
mov dword [ebx + 0x30], eax
movzx eax, al
add eax, dword [ebx + 0x34]
imul eax, eax, 0x8088405
inc eax
mov dword [ebx + 0x34], eax
shr eax, 0x18
xor eax, edx
shr edx, 8
movzx eax, al
xor edx, dword [eax*4 + 0x40c448]
mov eax, esi
xor eax, 1
mov dword [ebx + 0x38], edx
imul eax, esi
shr eax, 8
xor al, byte [ebp - 0x499]
mov byte [ebp + edi - 0x30], al
inc edi
cmp edi, 0xc
jl 0x409e90
mov eax, dword [ebx]
test eax, eax
je 0x409f1b
push 0xc
lea eax, [ebp - 0x30]
mov ecx, ebx
push eax
call fcn.004091c0
add dword [ebx + 0x18], 0xc
mov eax, dword [ebx]
mov edi, dword [ebp - 0x4a8]
xor esi, esi
test eax, eax
setne al
mov byte [ebx + 0x2d], al
cmp edi, 8
jne 0x409f42
lea eax, [ebp - 0x498]
mov ecx, ebx
push eax
call fcn.004095a0
mov esi, eax
jmp 0x409fa8
test edi, edi
jne 0x409fa8
push 0x4000
lea edi, [ebx + 0x94]
mov dword [ebp - 0x4ac], esi
push edi
mov ecx, ebx
call fcn.004094e0
mov esi, eax
test esi, esi
je 0x409f94
cmp esi, 0xffffffff
je 0x409f94
push esi
push edi
mov ecx, ebx
call fcn.004091c0
cmp eax, esi
jne 0x40a090
add dword [ebp - 0x4ac], esi
mov ecx, ebx
push 0x4000
push edi
call fcn.004094e0
mov esi, eax
test esi, esi
jne 0x409f65
mov eax, dword [ebp - 0x4ac]
xor esi, esi
mov dword [ebx + 0x90], eax
mov edi, dword [ebp - 0x4a8]
cmp byte [ebx + 0x80], 0
mov byte [ebx + 0x2d], 0
je 0x409fc3
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x409fc3
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 0x409d69
test esi, esi
jne 0x409d64
add ecx, dword [ebp - 0x4b0]
cmp dword [ebp - 0x488], ecx
mov eax, dword [ebx + 0x78]
sete byte [ebp - 0x499]
mov dword [ebp - 0x48c], eax
cmp byte [ebx + 0x1c], 0
mov dword [ebp - 0x488], ecx
mov dword [ebp - 0x484], edx
je 0x40a17c
cmp dword [ebx], esi
jne 0x40a17c
mov eax, dword [ebp - 0x4a4]
mov word [ebp - 0x492], ax
mov ax, word [ebp - 0x494]
test al, 1
jne 0x40a04d
mov ecx, 0xfff7
and ax, cx
mov word [ebp - 0x494], ax
mov edx, dword [ebx + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov word [ebp - 0x46c], ax
mov eax, dword [ebp - 0x464]
sub eax, edx
cmp dword [ebx + 0x20], 0
je 0x40a09f
cmp eax, dword [ebx + 0x28]
jb 0x40a09a
mov eax, 0x30000
mov dword [ebx + 0x14], eax
mov eax, 0x2000000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a67e
mov esp, ebp
pop ebp
ret 0x10
mov esi, 0x60000
jmp 0x409fa2
mov dword [ebx + 0x24], eax
jmp 0x40a0b4
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x40a15c
push 0
push 0
add eax, edx
push eax
push ecx
call esi
push ebx
lea ecx, [ebp - 0x498]
call fcn.00408590
add esp, 4
test eax, eax
jne 0x409d64
mov ecx, dword [ebx + 0x18]
cmp byte [ebx + 0x1c], al
jne 0x40a0f2
mov dword [ebx + 0x14], 0x2000000
mov eax, 0x2000000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a67e
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ebx + 0x20], 0
je 0x40a124
cmp ecx, dword [ebx + 0x28]
jb 0x40a11c
mov dword [ebx + 0x14], 0x30000
mov eax, 0x2000000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a67e
mov esp, ebp
pop ebp
ret 0x10
mov dword [ebx + 0x24], ecx
jmp 0x40a37c
mov edx, dword [ebx + 4]
test edx, edx
je 0x40a13d
mov eax, dword [ebx + 0x10]
push 0
push 0
add eax, ecx
push eax
push edx
call esi
jmp 0x40a37c
mov dword [ebx + 0x14], 0x1000000
mov eax, 0x2000000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a67e
mov esp, ebp
pop ebp
ret 0x10
mov eax, 0x1000000
mov dword [ebx + 0x14], eax
mov eax, 0x2000000
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a67e
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp - 0x4a4]
cmp word [ebp - 0x492], ax
jne 0x40a427
test edi, edi
jne 0x40a1a0
cmp byte [ebp - 0x499], 0
je 0x40a427
push 1
lea eax, [ebp - 0x49a]
mov byte [ebp - 0x49a], 0x50
push eax
mov ecx, ebx
call fcn.004091c0
push 1
lea eax, [ebp - 0x49a]
mov byte [ebp - 0x49a], 0x4b
push eax
mov ecx, ebx
call fcn.004091c0
push 1
lea eax, [ebp - 0x49b]
mov byte [ebp - 0x49b], 7
push eax
mov ecx, ebx
call fcn.004091c0
push 1
lea eax, [ebp - 0x49b]
mov byte [ebp - 0x49b], 8
push eax
mov ecx, ebx
call fcn.004091c0
movzx eax, byte [ebp - 0x48c]
mov ecx, ebx
mov byte [ebp - 0x49c], al
lea eax, [ebp - 0x49c]
push 1
push eax
call fcn.004091c0
mov eax, dword [ebp - 0x48c]
mov ecx, ebx
shr eax, 8
mov byte [ebp - 0x49c], al
lea eax, [ebp - 0x49c]
push 1
push eax
call fcn.004091c0
mov eax, dword [ebp - 0x48c]
mov ecx, ebx
shr eax, 0x10
mov byte [ebp - 0x49d], al
lea eax, [ebp - 0x49d]
push 1
push eax
call fcn.004091c0
mov eax, dword [ebp - 0x48c]
mov ecx, ebx
shr eax, 0x18
mov byte [ebp - 0x49d], al
lea eax, [ebp - 0x49d]
push 1
push eax
call fcn.004091c0
movzx eax, byte [ebp - 0x488]
mov ecx, ebx
mov byte [ebp - 0x49e], al
lea eax, [ebp - 0x49e]
push 1
push eax
call fcn.004091c0
mov eax, dword [ebp - 0x488]
mov ecx, ebx
shr eax, 8
mov byte [ebp - 0x49e], al
lea eax, [ebp - 0x49e]
push 1
push eax
call fcn.004091c0
mov eax, dword [ebp - 0x488]
mov ecx, ebx
shr eax, 0x10
mov byte [ebp - 0x49f], al
lea eax, [ebp - 0x49f]
push 1
push eax
call fcn.004091c0
mov eax, dword [ebp - 0x488]
shr eax, 0x18
mov byte [ebp - 0x49f], al
push 1
lea eax, [ebp - 0x49f]
mov ecx, ebx
push eax
call fcn.004091c0
movzx eax, byte [ebp - 0x484]
mov ecx, ebx
mov byte [ebp - 0x4a0], al
lea eax, [ebp - 0x4a0]
push 1
push eax
call fcn.004091c0
mov eax, dword [ebp - 0x484]
mov ecx, ebx
shr eax, 8
mov byte [ebp - 0x4a0], al
lea eax, [ebp - 0x4a0]
push 1
push eax
call fcn.004091c0
mov eax, dword [ebp - 0x484]
mov ecx, ebx
shr eax, 0x10
mov byte [ebp - 0x499], al
lea eax, [ebp - 0x499]
push 1
push eax
call fcn.004091c0
mov eax, dword [ebp - 0x484]
mov ecx, ebx
shr eax, 0x18
mov byte [ebp - 0x499], al
lea eax, [ebp - 0x499]
push 1
push eax
call fcn.004091c0
mov ax, word [ebp - 0x46c]
add dword [ebx + 0x18], 0x10
mov word [ebp - 0x494], ax
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x409d69
push dword [ebp - 0x478]
call fcn.0040a694
add esp, 4
mov esi, eax
push dword [ebp - 0x478]
push dword [ebp - 0x358]
push esi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov dword [ebp - 0x358], esi
push 0x360
call fcn.0040a6c0
mov edx, eax
lea esi, [ebp - 0x498]
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 0x40a3ef
mov dword [ebx + 0x44], edx
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a67e
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ecx + 0x35c]
test eax, eax
je 0x40a40c
nop dword [eax]
mov ecx, eax
mov eax, dword [ecx + 0x35c]
test eax, eax
jne 0x40a400
mov dword [ecx + 0x35c], edx
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a67e
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [ebp - 4]
mov eax, 0x4000000
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040a67e
mov esp, ebp
pop ebp
ret 0x10