Function at 0x10049b7
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.01003e65
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
and eax, 0x11
mov ebx, 0x1006030
cmp eax, 0x111
je 0x1004dc0
call esi
mov dword [0x100602c], eax
call fcn.01004358
mov ecx, eax
sub ecx, dword [0x100602c]
push 3
xor edx, edx
mov eax, ecx
pop esi
mov edi, 0xffff8000
div esi
test edi, ecx
jne 0x1004c5c
call fcn.010050d5
and dword [esp + 0x494], 0
xor eax, eax
mov word [esp + 0x80], ax
call fcn.01004358
mov ecx, eax
sub ecx, dword [0x100602c]
xor edx, edx
mov eax, ecx
div esi
test edi, ecx
jne 0x1004c5c
call fcn.010042e4
mov esi, eax
add esi, 0xfe0
cmp dword [esi], 0x696d7678
jne 0x1004a82
cmp dword [esi + 4], 0x74636a6e
je 0x1004aa7
call fcn.01004003
test eax, eax
je 0x1004fbe
cmp eax, 1
jne 0x1004aa5
push esi
call fcn.0100467a
pop ecx
test al, al
je 0x1004fbe
jmp 0x1004aa7
xor esi, esi
xor eax, eax
cmp esi, eax
je 0x1004af8
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 0x1004ebb
push ecx
push ecx
push ecx
push 6
push dword [eax + 0x1c]
call esi
mov dword [esp + 0x3c], eax
test eax, eax
je 0x1004ec5
mov ecx, dword [eax + 0x4c]
add ecx, eax
mov eax, dword [eax + 0x48]
push ecx
lea esi, [esp + 0x84]
call fcn.0100508d
jmp 0x1004b1f
push 0x104
lea ecx, [esp + 0x84]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x80]
call fcn.01005020
mov dword [esp + 0x494], eax
call fcn.01004358
mov ecx, eax
sub ecx, dword [0x100602c]
push 3
xor edx, edx
mov eax, ecx
pop esi
div esi
test edi, ecx
jne 0x1004c5c
lea eax, [esp + 0x80]
push eax
or edi, 0xffffffff
mov eax, edi
mov esi, ebx
call fcn.0100508d
push 0x10011b0
mov eax, edi
call fcn.0100508d
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 0x1004ecf
call fcn.01003f7d
test eax, eax
jne 0x1004a0f
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 0x1004edb
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 0x1004ee5
mov edi, eax
call fcn.01003fb6
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 0x1004eef
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 0x1004ef9
jg 0x1004c1b
mov eax, dword [esp + 0x30]
cmp eax, ecx
jbe 0x1004ef9
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 0x1004f2b
call fcn.01004358
mov ecx, eax
sub ecx, dword [0x100602c]
push 3
xor edx, edx
mov eax, ecx
pop edi
div edi
test ecx, 0xffff8000
je 0x1004c72
test edx, edx
je 0x1004f88
cmp edx, 1
je 0x1004a0f
jmp 0x1004dc0
mov edi, dword [esp + 0xc]
call fcn.01003fb6
add eax, edi
mov ecx, dword [eax]
add eax, esi
cmp ecx, 0x6d7678
jne 0x1004f32
mov ecx, dword [eax]
add eax, esi
cmp ecx, 3
jne 0x1004f3c
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 0x1004f46
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 0x1004f50
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 0x1004f5a
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 0x1004f61
add eax, edi
mov dword [esp + 0x14], eax
cmp esi, ecx
jbe 0x1004d9b
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 0x1004d7e
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.01003df0
test eax, eax
jne 0x1004f68
push 4
push 0x1000
push dword [esp + 0x24]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
call fcn.01004358
mov ecx, eax
sub ecx, dword [0x100602c]
push 3
xor edx, edx
mov eax, ecx
pop edi
div edi
test ecx, 0xffff8000
je 0x1004e05
test edx, edx
je 0x1004f88
cmp edx, 1
jne 0x1004dc0
jmp 0x1004a0f
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.01002f40
pop ecx
cmp eax, 1
jne 0x1004f72
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.01004358
mov ecx, eax
sub ecx, dword [0x100602c]
push 3
xor edx, edx
mov eax, ecx
pop edi
div edi
test ecx, 0xffff8000
jne 0x1004c5c
push esi
call fcn.01004418
mov dword [esp], 0x8000
push dword [esp + 0x20]
mov edi, eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
test edi, edi
je 0x1004fbe
push edi
call fcn.01004322
pop ecx
push edi
call fcn.01004385
pop ecx
mov dword [esp + 0x2c], eax
test eax, eax
jne 0x1004f7c
push 0x1001478
or eax, 0xffffffff
mov esi, ebx
call fcn.0100508d
jmp 0x1004fbe
push 0x1001310
jmp 0x1004fa5
push 0x1001324
jmp 0x1004fa5
push 0x1001338
mov eax, edi
jmp 0x1004faa
push 0x1001384
jmp 0x1004fa7
push 0x1001398
jmp 0x1004fa5
push 0x10013ac
jmp 0x1004fa5
push 0x10013c0
or eax, 0xffffffff
mov esi, ebx
call fcn.0100508d
mov eax, dword [esp + 0x30]
push 0xa
mov ecx, ebx
call fcn.01005031
push 0x10011b0
or eax, 0xffffffff
call fcn.0100508d
push 0xa
mov eax, edi
jmp 0x1004fb7
push 0x10013d4
jmp 0x1004fa5
push 0x10013e8
jmp 0x1004eac
push 0x10013f8
jmp 0x1004eac
push 0x1001408
jmp 0x1004eac
push 0x1001418
jmp 0x1004eac
push 0x1001428
jmp 0x1004fa5
push 0x100143c
jmp 0x1004fa5
push 0x1001450
jmp 0x1004eac
push 0x1001460
jmp 0x1004eac
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
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 0x1004fe3
push 0x1001488
mov esi, ebx
or eax, 0xffffffff
call fcn.0100508d
push 0xa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, ebx
call fcn.01005031
push 0x100149c
push 0x10014a8
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
push 0x10014c0
push ebx
push 0
call eax
jmp 0x1005019
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