Function at 0x4049b7
Capabilities:
Check for time delay via gettickcount
Encode data using xor
Generate random numbers using the delphi lcg
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x48c
xor eax, eax
push ebx
push esi
push edi
mov dword [esp + 0x24], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], eax
call fcn.00403e65
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
and eax, 0x11
mov ebx, 0x406030
cmp eax, 0x111
je 0x404dc0
call esi
mov dword [0x40602c], eax
call fcn.00404358
mov ecx, eax
sub ecx, dword [0x40602c]
push 3
xor edx, edx
mov eax, ecx
pop esi
mov edi, 0xffff8000
div esi
test edi, ecx
jne 0x404c5c
call fcn.004050d5
and dword [esp + 0x494], 0
xor eax, eax
mov word [esp + 0x80], ax
call fcn.00404358
mov ecx, eax
sub ecx, dword [0x40602c]
xor edx, edx
mov eax, ecx
div esi
test edi, ecx
jne 0x404c5c
call fcn.004042e4
mov esi, eax
add esi, 0xfe0
cmp dword [esi], 0x696d7678
jne 0x404a82
cmp dword [esi + 4], 0x74636a6e
je 0x404aa7
call fcn.00404003
test eax, eax
je 0x404fbe
cmp eax, 1
jne 0x404aa5
push esi
call fcn.0040467a
pop ecx
test al, al
je 0x404fbe
jmp 0x404aa7
xor esi, esi
xor eax, eax
cmp esi, eax
je 0x404af8
push eax
push eax
push eax
push 6
push dword [esi + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_MapViewOfFile]
call esi
xor ecx, ecx
mov dword [esp + 0x24], eax
cmp eax, ecx
je 0x404ebb
push ecx
push ecx
push ecx
push 6
push dword [eax + 0x1c]
call esi
mov dword [esp + 0x3c], eax
test eax, eax
je 0x404ec5
mov ecx, dword [eax + 0x4c]
add ecx, eax
mov eax, dword [eax + 0x48]
push ecx
lea esi, [esp + 0x84]
call fcn.0040508d
jmp 0x404b1f
push 0x104
lea ecx, [esp + 0x84]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x80]
call fcn.00405020
mov dword [esp + 0x494], eax
call fcn.00404358
mov ecx, eax
sub ecx, dword [0x40602c]
push 3
xor edx, edx
mov eax, ecx
pop esi
div esi
test edi, ecx
jne 0x404c5c
lea eax, [esp + 0x80]
push eax
or edi, 0xffffffff
mov eax, edi
mov esi, ebx
call fcn.0040508d
push 0x4011b0
mov eax, edi
call fcn.0040508d
xor eax, eax
push eax
push eax
push 3
push eax
push 7
push 0x80000000
lea eax, [esp + 0x98]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x10], eax
cmp eax, edi
je 0x404ecf
call fcn.00403f7d
test eax, eax
jne 0x404a0f
xor edi, edi
push edi
push edi
push edi
push 2
push edi
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esp + 0x18], eax
cmp eax, edi
je 0x404edb
mov esi, 0x1000
push esi
push edi
push edi
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esp + 0xc], eax
cmp eax, edi
je 0x404ee5
mov edi, eax
call fcn.00403fb6
push dword [esp + 0xc]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x404eef
xor eax, eax
push eax
mov ecx, edi
add ecx, esi
mov esi, dword [esp + 0x38]
pop edx
adc eax, edx
cmp esi, eax
jl 0x404ef9
jg 0x404c1b
mov eax, dword [esp + 0x30]
cmp eax, ecx
jbe 0x404ef9
add edi, 0x1000
push edi
push edx
push edx
push 4
pop esi
push esi
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esp + 0xc], eax
test eax, eax
je 0x404f2b
call fcn.00404358
mov ecx, eax
sub ecx, dword [0x40602c]
push 3
xor edx, edx
mov eax, ecx
pop edi
div edi
test ecx, 0xffff8000
je 0x404c72
test edx, edx
je 0x404f88
cmp edx, 1
je 0x404a0f
jmp 0x404dc0
mov edi, dword [esp + 0xc]
call fcn.00403fb6
add eax, edi
mov ecx, dword [eax]
add eax, esi
cmp ecx, 0x6d7678
jne 0x404f32
mov ecx, dword [eax]
add eax, esi
cmp ecx, 3
jne 0x404f3c
mov ecx, dword [eax]
mov edx, ecx
imul edx, edx, 0x8088405
add eax, esi
mov edi, dword [eax]
inc edx
mov dword [esp + 0x14], edi
mov edi, edx
xor edi, ecx
add eax, esi
mov dword [esp + 0x20], edx
cmp edi, dword [esp + 0x14]
jne 0x404f46
mov edi, dword [eax]
mov ecx, edx
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esp + 0x14], edi
mov edi, ecx
xor edi, edx
add eax, esi
cmp edi, dword [esp + 0x14]
jne 0x404f50
mov edx, dword [eax]
imul ecx, ecx, 0x8088405
inc ecx
xor edx, ecx
imul ecx, ecx, 0x8088405
push dword [esp + 0xc]
add eax, esi
mov esi, dword [eax]
inc ecx
xor esi, ecx
imul ecx, ecx, 0x2b9ad7e7
mov dword [esp + 0x20], edx
add eax, 8
mov edi, eax
sub edi, dword [esp + 0x10]
mov edx, 0x8088406
sub edx, ecx
xor edx, dword [eax]
add edi, 4
add edx, edi
add edx, esi
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
push eax
push eax
push eax
push 8
push eax
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esp + 0x18], eax
test eax, eax
je 0x404f5a
lea ecx, [edi + esi]
push ecx
push 0
push 0
push 1
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
xor ecx, ecx
mov dword [esp + 0xc], eax
cmp eax, ecx
je 0x404f61
add eax, edi
mov dword [esp + 0x14], eax
cmp esi, ecx
jbe 0x404d9b
mov edx, dword [esp + 0x20]
imul edx, edx, 0x343fd
add edx, 0x269ec3
mov dword [esp + 0x20], edx
shr edx, 0x10
xor byte [eax], dl
inc eax
dec esi
jne 0x404d7e
lea esi, [esp + 0x48]
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x70], ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x48], ecx
call fcn.00403df0
test eax, eax
jne 0x404f68
push 4
push 0x1000
push dword [esp + 0x24]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
call fcn.00404358
mov ecx, eax
sub ecx, dword [0x40602c]
push 3
xor edx, edx
mov eax, ecx
pop edi
div edi
test ecx, 0xffff8000
je 0x404e05
test edx, edx
je 0x404f88
cmp edx, 1
jne 0x404dc0
jmp 0x404a0f
mov eax, dword [esp + 0x40]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x58], eax
lea eax, [esp + 0x48]
push eax
mov dword [esp + 0x58], esi
call fcn.00402f40
pop ecx
cmp eax, 1
jne 0x404f72
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00404358
mov ecx, eax
sub ecx, dword [0x40602c]
push 3
xor edx, edx
mov eax, ecx
pop edi
div edi
test ecx, 0xffff8000
jne 0x404c5c
push esi
call fcn.00404418
mov dword [esp], 0x8000
push dword [esp + 0x20]
mov edi, eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
test edi, edi
je 0x404fbe
push edi
call fcn.00404322
pop ecx
push edi
call fcn.00404385
pop ecx
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x404f7c
push 0x401478
or eax, 0xffffffff
mov esi, ebx
call fcn.0040508d
jmp 0x404fbe
push 0x401310
jmp 0x404fa5
push 0x401324
jmp 0x404fa5
push 0x401338
mov eax, edi
jmp 0x404faa
push 0x401384
jmp 0x404fa7
push 0x401398
jmp 0x404fa5
push 0x4013ac
jmp 0x404fa5
push 0x4013c0
or eax, 0xffffffff
mov esi, ebx
call fcn.0040508d
mov eax, dword [esp + 0x30]
push 0xa
mov ecx, ebx
call fcn.00405031
push 0x4011b0
or eax, 0xffffffff
call fcn.0040508d
push 0xa
mov eax, edi
jmp 0x404fb7
push 0x4013d4
jmp 0x404fa5
push 0x4013e8
jmp 0x404eac
push 0x4013f8
jmp 0x404eac
push 0x401408
jmp 0x404eac
push 0x401418
jmp 0x404eac
push 0x401428
jmp 0x404fa5
push 0x40143c
jmp 0x404fa5
push 0x401450
jmp 0x404eac
push 0x401460
jmp 0x404eac
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [esp + 0x28], eax
xor edi, edi
push edi
push edi
push edi
push 2
push edi
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov esi, eax
cmp esi, edi
jne 0x404fe3
push 0x401488
mov esi, ebx
or eax, 0xffffffff
call fcn.0040508d
push 0xa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, ebx
call fcn.00405031
push 0x40149c
push 0x4014a8
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
push 0x4014c0
push ebx
push 0
call eax
jmp 0x405019
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x3c]
mov eax, dword [esp + 0x48]
push dword [esp + 0x28]
add eax, 0xffff
shr eax, 0x10
shl eax, 0x10
push eax
push dword [esp + 0x40]
push dword [esp + 0x40]
push esi
push dword [esp + 0x40]
call dword [esp + 0x48]
add esp, 0x1c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret