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

Disassembly:
sub esp, 0x5b4
push ebx
mov ebx, ecx
push ebp
push esi
push edi
cmp dword [ebx + 0x14], 0
je 0x4a13f4
mov eax, 0x40000
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 0x10
cmp byte [ebx + 0x2c], 0
je 0x4a140c
mov eax, 0x50000
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 0x10
mov ebp, dword [ebx]
lea edx, [esp + 0x3b8]
mov ecx, dword [esp + 0x5c8]
neg ebp
sbb ebp, ebp
and ebp, 0xc
sub edx, ecx
mov dword [esp + 0x34], ebp
nop dword [eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x4a1430
mov ax, word [esp + 0x3b8]
test ax, ax
jne 0x4a145f
mov eax, 0x10000
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 0x10
lea ecx, [esp + 0x3b8]
movzx edx, ax
mov esi, 0x2f
nop
cmp dx, 0x5c
jne 0x4a1479
mov word [ecx], si
movzx eax, word [ecx + 2]
add ecx, 2
mov edx, eax
test ax, ax
jne 0x4a1470
lea ecx, [esp + 0x3b8]
mov dword [esp + 0x1c], 8
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4a14a0
sub ecx, edx
lea esi, [esp + 0x3b8]
sar ecx, 1
lea eax, [esp + 0x3b8]
lea esi, [esi + ecx*2]
cmp esi, eax
jbe 0x4a14d8
cmp word [esi], 0x2e
je 0x4a14d8
sub esi, 2
lea eax, [esp + 0x3b8]
cmp esi, eax
ja 0x4a14c4
lea eax, [esp + 0x3b8]
cmp esi, eax
jne 0x4a14ed
cmp word [esi], 0x2e
jne 0x4a1585
push 0x4d6508
push esi
call fcn.004aee97
add esp, 8
test eax, eax
je 0x4a157d
push str..zip
push esi
call fcn.004aee97
add esp, 8
test eax, eax
je 0x4a157d
push str..zoo
push esi
call fcn.004aee97
add esp, 8
test eax, eax
je 0x4a157d
push str..arc
push esi
call fcn.004aee97
add esp, 8
test eax, eax
je 0x4a157d
push str..lzh
push esi
call fcn.004aee97
add esp, 8
test eax, eax
je 0x4a157d
push str..arj
push esi
call fcn.004aee97
add esp, 8
test eax, eax
je 0x4a157d
push 0x4d6540
push esi
call fcn.004aee97
add esp, 8
test eax, eax
je 0x4a157d
push str..tgz
push esi
call fcn.004aee97
add esp, 8
test eax, eax
jne 0x4a1585
mov dword [esp + 0x1c], 0
mov eax, dword [esp + 0x5cc]
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 0x4a15db
mov esi, 0x10000
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 0x10
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4a160c
mov esi, 0x200
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 0x10
push ecx
push edi
mov ecx, ebx
call fcn.004a0e10
mov esi, eax
test esi, esi
je 0x4a1631
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 0x10
push 0
push 0
push 0x104
lea eax, [esp + 0x1ac]
mov byte [ebx + 0x80], 1
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x3cc]
mov dword [esp + 0x3c8], 0
push eax
push 0
push 0xfde9
mov byte [esp + 0xb0], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea ecx, [esp + 0x1a0]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4a1680
mov byte [esp + 0x2a4], al
sub ecx, edx
xor eax, eax
mov dword [esp + 0x70], ecx
cmp dword [ebx], 0
mov word [esp + 0x82], ax
mov eax, dword [ebx + 0x68]
mov dword [esp + 0x60], eax
mov eax, 8
mov dword [esp + 0x19c], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x3a8], 1
mov dword [esp + 0x3b0], 0
mov dword [esp + 0x58], 0x140b17
mov dword [esp + 0x64], 0
mov word [esp + 0x5c], ax
je 0x4a16f7
mov eax, 9
mov word [esp + 0x5c], ax
mov word [esp + 0x84], ax
mov eax, dword [esp + 0x1c]
movzx ecx, ax
mov dword [esp + 0x38], ecx
mov word [esp + 0x5e], cx
mov ecx, dword [ebx + 0x70]
test eax, eax
jne 0x4a1723
test ecx, ecx
js 0x4a1723
lea eax, [ecx + ebp]
mov dword [esp + 0x68], eax
jmp 0x4a172b
mov dword [esp + 0x68], 0
xor eax, eax
mov edx, dword [ebx + 0x5c]
mov word [esp + 0x80], ax
mov eax, dword [ebx + 0x4c]
mov dword [esp + 0x88], eax
mov eax, dword [ebx + 0x18]
add eax, dword [ebx + 0x10]
mov dword [esp + 0x8c], eax
lea eax, [esp + 0x20]
mov dword [esp + 0x194], eax
lea eax, [esp + 0x40]
mov dword [esp + 0x198], eax
movzx eax, byte [ebx + 0x58]
mov byte [esp + 0x25], al
mov eax, edx
mov dword [esp + 0x6c], ecx
mov ecx, dword [ebx + 0x58]
shrd ecx, eax, 8
mov dword [esp + 0x20], 0xd5455
mov byte [esp + 0x26], 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 [esp + 0x3c], eax
mov byte [esp + 0x28], al
movzx eax, byte [ebx + 0x50]
mov byte [esp + 0x29], al
mov eax, edx
mov byte [esp + 0x27], cl
mov ecx, dword [ebx + 0x50]
shrd ecx, eax, 8
mov byte [esp + 0x24], 7
mov byte [esp + 0x2a], cl
mov ecx, dword [ebx + 0x50]
shrd ecx, eax, 0x10
mov eax, dword [ebx + 0x50]
movq xmm0, qword [esp + 0x20]
shrd eax, edx, 0x18
mov edx, dword [ebx + 0x64]
mov byte [esp + 0x2c], al
movzx eax, byte [ebx + 0x60]
mov byte [esp + 0x2d], al
mov eax, edx
mov byte [esp + 0x2b], cl
mov ecx, dword [ebx + 0x60]
shrd ecx, eax, 8
movq qword [esp + 0x40], xmm0
mov byte [esp + 0x2e], cl
mov ecx, dword [ebx + 0x60]
shrd ecx, eax, 0x10
mov eax, dword [ebx + 0x60]
shrd eax, edx, 0x18
mov byte [esp + 0x2f], cl
lea ecx, [esp + 0x58]
mov byte [esp + 0x30], al
mov eax, dword [esp + 0x3c]
push ebx
mov dword [esp + 0x78], 0x11
mov dword [esp + 0x7c], 9
mov byte [esp + 0x4c], al
mov byte [esp + 0x46], 5
call fcn.004a0010
add esp, 4
test eax, eax
je 0x4a1871
cmp byte [ebx + 0x80], 0
je 0x4a1852
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x4a1852
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 ebp
pop ebx
add esp, 0x5b4
ret 0x10
mov eax, dword [esp + 0x74]
add eax, 0x1e
add eax, dword [esp + 0x70]
add dword [ebx + 0x18], eax
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x4a18ba
cmp byte [ebx + 0x80], 0
je 0x4a18a0
mov ecx, dword [ebx + 0x7c]
test ecx, ecx
je 0x4a18a0
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 ebp
pop ebx
add esp, 0x5b4
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 0x4a1922
mov al, byte [edx]
test al, al
je 0x4a1922
mov ecx, dword [ebx + 0x30]
movsx eax, al
xor eax, ecx
shr ecx, 8
movzx eax, al
mov eax, dword [eax*4 + 0x4ce600]
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 + 0x4ce600]
mov dword [ebx + 0x38], ecx
add edx, 1
jne 0x4a18d5
cmp byte [0x4dc674], 0
jne 0x4a1944
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor esi, eax
push esi
call fcn.004aa01a
add esp, 4
xor esi, esi
call fcn.004a9ff9
sar eax, 7
mov byte [esp + esi + 0x4c], al
inc esi
cmp esi, 0xc
jl 0x4a1946
mov eax, dword [esp + 0x60]
shr eax, 8
xor edi, edi
mov byte [esp + 0x57], al
mov al, byte [esp + edi + 0x4c]
mov ecx, dword [ebx + 0x30]
mov byte [esp + 0x14], 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 + 0x4ce600]
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 + 0x4ce600]
mov eax, esi
xor eax, 1
mov dword [ebx + 0x38], edx
imul eax, esi
shr eax, 8
xor al, byte [esp + 0x14]
mov byte [esp + edi + 0x4c], al
inc edi
cmp edi, 0xc
jl 0x4a1965
mov eax, dword [ebx]
test eax, eax
je 0x4a19ed
push 0xc
lea eax, [esp + 0x50]
mov ecx, ebx
push eax
call fcn.004a0cc0
add dword [ebx + 0x18], 0xc
mov eax, dword [ebx]
mov edi, dword [esp + 0x1c]
xor esi, esi
test eax, eax
setne al
mov byte [ebx + 0x2d], al
cmp edi, 8
jne 0x4a1a10
lea eax, [esp + 0x58]
mov ecx, ebx
push eax
call fcn.004a1080
mov esi, eax
jmp 0x4a1a6b
test edi, edi
jne 0x4a1a6b
push 0x4000
lea edi, [ebx + 0x94]
mov ecx, ebx
push edi
xor ebp, ebp
call fcn.004a0fc0
mov esi, eax
test esi, esi
je 0x4a1a5b
nop
cmp esi, 0xffffffff
je 0x4a1a5b
push esi
push edi
mov ecx, ebx
call fcn.004a0cc0
cmp eax, esi
jne 0x4a1b39
push 0x4000
push edi
mov ecx, ebx
add ebp, esi
call fcn.004a0fc0
mov esi, eax
test esi, esi
jne 0x4a1a30
mov dword [ebx + 0x90], ebp
xor esi, esi
mov edi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x34]
cmp byte [ebx + 0x80], 0
mov byte [ebx + 0x2d], 0
je 0x4a1a86
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x4a1a86
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 0x4a1864
test esi, esi
jne 0x4a185f
mov eax, dword [ebx + 0x78]
add ecx, ebp
cmp dword [esp + 0x68], ecx
mov dword [esp + 0x64], eax
sete byte [esp + 0x14]
mov dword [esp + 0x68], ecx
cmp byte [ebx + 0x1c], 0
mov dword [esp + 0x6c], edx
je 0x4a1c0b
cmp dword [ebx], esi
jne 0x4a1c0b
mov eax, dword [esp + 0x38]
mov word [esp + 0x5e], ax
mov ax, word [esp + 0x5c]
test al, 1
jne 0x4a1afa
mov ecx, 0xfff7
and ax, cx
mov word [esp + 0x5c], ax
mov edx, dword [ebx + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov word [esp + 0x84], ax
mov eax, dword [esp + 0x8c]
sub eax, edx
cmp dword [ebx + 0x20], 0
je 0x4a1b48
cmp eax, dword [ebx + 0x28]
jb 0x4a1b43
mov eax, 0x30000
mov dword [ebx + 0x14], eax
mov eax, 0x2000000
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 0x10
mov esi, 0x60000
jmp 0x4a1a63
mov dword [ebx + 0x24], eax
jmp 0x4a1b5d
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x4a1bf1
push 0
push 0
add eax, edx
push eax
push ecx
call esi
push ebx
lea ecx, [esp + 0x5c]
call fcn.004a0010
add esp, 4
test eax, eax
jne 0x4a185f
mov ecx, dword [ebx + 0x18]
cmp byte [ebx + 0x1c], al
jne 0x4a1b93
mov dword [ebx + 0x14], 0x2000000
mov eax, 0x2000000
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 0x10
cmp dword [ebx + 0x20], 0
je 0x4a1bbf
cmp ecx, dword [ebx + 0x28]
jb 0x4a1bb7
mov dword [ebx + 0x14], 0x30000
mov eax, 0x2000000
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 0x10
mov dword [ebx + 0x24], ecx
jmp 0x4a1dac
mov edx, dword [ebx + 4]
test edx, edx
je 0x4a1bd8
mov eax, dword [ebx + 0x10]
push 0
push 0
add eax, ecx
push eax
push edx
call esi
jmp 0x4a1dac
mov dword [ebx + 0x14], 0x1000000
mov eax, 0x2000000
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 0x10
mov eax, 0x1000000
mov dword [ebx + 0x14], eax
mov eax, 0x2000000
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 0x10
mov eax, dword [esp + 0x38]
cmp word [esp + 0x5e], ax
jne 0x4a1e41
test edi, edi
jne 0x4a1c29
cmp byte [esp + 0x14], 0
je 0x4a1e41
push 1
lea eax, [esp + 0x19]
mov byte [esp + 0x19], 0x50
push eax
mov ecx, ebx
call fcn.004a0cc0
push 1
lea eax, [esp + 0x19]
mov byte [esp + 0x19], 0x4b
push eax
mov ecx, ebx
call fcn.004a0cc0
push 1
lea eax, [esp + 0x1a]
mov byte [esp + 0x1a], 7
push eax
mov ecx, ebx
call fcn.004a0cc0
push 1
lea eax, [esp + 0x1a]
mov byte [esp + 0x1a], 8
push eax
mov ecx, ebx
call fcn.004a0cc0
movzx eax, byte [esp + 0x64]
mov ecx, ebx
mov byte [esp + 0x17], al
lea eax, [esp + 0x17]
push 1
push eax
call fcn.004a0cc0
mov eax, dword [esp + 0x64]
mov ecx, ebx
shr eax, 8
mov byte [esp + 0x17], al
lea eax, [esp + 0x17]
push 1
push eax
call fcn.004a0cc0
mov eax, dword [esp + 0x64]
mov ecx, ebx
shr eax, 0x10
mov byte [esp + 0x18], al
lea eax, [esp + 0x18]
push 1
push eax
call fcn.004a0cc0
mov eax, dword [esp + 0x64]
mov ecx, ebx
shr eax, 0x18
mov byte [esp + 0x18], al
lea eax, [esp + 0x18]
push 1
push eax
call fcn.004a0cc0
movzx eax, byte [esp + 0x68]
mov ecx, ebx
mov byte [esp + 0x19], al
lea eax, [esp + 0x19]
push 1
push eax
call fcn.004a0cc0
mov eax, dword [esp + 0x68]
mov ecx, ebx
shr eax, 8
mov byte [esp + 0x19], al
lea eax, [esp + 0x19]
push 1
push eax
call fcn.004a0cc0
mov eax, dword [esp + 0x68]
mov ecx, ebx
shr eax, 0x10
mov byte [esp + 0x1a], al
lea eax, [esp + 0x1a]
push 1
push eax
call fcn.004a0cc0
mov eax, dword [esp + 0x68]
shr eax, 0x18
mov byte [esp + 0x1a], al
push 1
lea eax, [esp + 0x1e]
mov ecx, ebx
push eax
call fcn.004a0cc0
movzx eax, byte [esp + 0x6c]
mov ecx, ebx
mov byte [esp + 0x1b], al
lea eax, [esp + 0x1b]
push 1
push eax
call fcn.004a0cc0
mov eax, dword [esp + 0x6c]
mov ecx, ebx
shr eax, 8
mov byte [esp + 0x1b], al
lea eax, [esp + 0x1b]
push 1
push eax
call fcn.004a0cc0
mov eax, dword [esp + 0x6c]
mov ecx, ebx
shr eax, 0x10
mov byte [esp + 0x14], al
lea eax, [esp + 0x14]
push 1
push eax
call fcn.004a0cc0
mov eax, dword [esp + 0x6c]
mov ecx, ebx
shr eax, 0x18
mov byte [esp + 0x14], al
lea eax, [esp + 0x14]
push 1
push eax
call fcn.004a0cc0
mov ax, word [esp + 0x84]
add dword [ebx + 0x18], 0x10
mov word [esp + 0x5c], ax
mov eax, dword [ebx + 0x14]
test eax, eax
jne 0x4a1864
push dword [esp + 0x78]
call fcn.004a24f4
add esp, 4
mov esi, eax
push dword [esp + 0x78]
push dword [esp + 0x19c]
push esi
call fcn.004a5830
add esp, 0xc
mov dword [esp + 0x198], esi
push 0x360
call fcn.004a24b6
mov edx, eax
lea esi, [esp + 0x5c]
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 0x4a1e15
mov dword [ebx + 0x44], edx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 0x10
mov eax, dword [ecx + 0x35c]
test eax, eax
je 0x4a1e2c
nop
mov ecx, eax
mov eax, dword [ecx + 0x35c]
test eax, eax
jne 0x4a1e20
mov dword [ecx + 0x35c], edx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x5b4
ret 0x10
pop edi
pop esi
pop ebp
mov eax, 0x4000000
pop ebx
add esp, 0x5b4
ret 0x10