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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xcc4
push ebx
push esi
push edi
call fcn.00003e66
call dword [sym.imp.KERNEL32.dll_GetTickCount]
and eax, 0x11
xor ebx, ebx
cmp eax, 0x111
je 0x4697
lea eax, [esp + 0x30]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call fcn.00003f42
pop ecx
call fcn.00003fbd
mov ecx, eax
sub ecx, dword [0x5015]
push 3
xor edx, edx
mov eax, ecx
pop esi
mov edi, 0xfffff000
div esi
test edi, ecx
jne 0x457a
lea eax, [esp + 0x34]
push eax
push 0x18
lea eax, [esp + 0x78]
push eax
push ebx
mov dword [esp + 0x8c4], ebx
mov word [esp + 0x4b0], bx
mov dword [esp + 0x4ac], ebx
mov word [esp + 0x98], bx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [0x5005]
mov ecx, eax
mov dword [esp + 0x14], eax
mov eax, 0x80000000
and ecx, eax
cmp ecx, eax
je 0x477e
call fcn.00003fbd
mov ecx, eax
sub ecx, dword [0x5015]
xor edx, edx
mov eax, ecx
div esi
test edi, ecx
jne 0x457a
mov esi, dword [esp + 0x84]
push 0x1161
lea eax, [esp + 0x8bc]
call fcn.00004a09
push 0x10
mov eax, esi
lea ecx, [esp + 0x8bc]
call fcn.00004951
push 0x1179
mov esi, ecx
call fcn.000049b5
mov eax, dword [esp + 0x30]
push 0x10
mov ecx, esi
call fcn.00004951
mov eax, esi
push eax
push ebx
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, ebx
mov dword [esp + 0x14], eax
je 0x444f
push ebx
push ebx
push ebx
push 4
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
cmp edi, ebx
je 0x4796
lea eax, [edi + 4]
push eax
lea eax, [esp + 0x4a4]
call fcn.000049ee
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, 0xfffff000
jmp 0x447f
cmp eax, 2
jne 0x48d2
push 0x104
lea eax, [esp + 0x4a4]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x4a0]
call fcn.00004940
mov dword [esp + 0x8b4], eax
call fcn.00003fbd
mov ecx, eax
sub ecx, dword [0x5015]
push 3
xor edx, edx
mov eax, ecx
pop esi
div esi
test edi, ecx
jne 0x457a
lea eax, [esp + 0x4a0]
push eax
lea esi, [esp + 0x8c]
call fcn.000049b5
push 0x11a9
call fcn.000049b5
push ebx
push ebx
push 3
push ebx
push 7
push 0x80000000
lea eax, [esp + 0x4b8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x18], eax
je 0x47b8
call fcn.00003f0c
test eax, eax
jne 0x431a
push ebx
push ebx
push ebx
push 2
push ebx
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
cmp eax, ebx
mov dword [esp + 0x1c], eax
je 0x47c5
push 0x1000
push ebx
push ebx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
cmp esi, ebx
je 0x47d2
mov edi, esi
call fcn.00003eda
mov edi, eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [esp + 0x30], edi
call esi
add edi, 0x1000
push edi
push ebx
push ebx
push 4
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, ebx
mov dword [esp + 0x24], eax
je 0x47df
call fcn.00003fbd
mov ecx, eax
sub ecx, dword [0x5015]
push 3
xor edx, edx
mov eax, ecx
pop edi
div edi
test ecx, 0xfffff000
je 0x4590
cmp edx, ebx
je 0x4883
cmp edx, 1
je 0x431a
jmp 0x4697
mov edi, dword [esp + 0x24]
call fcn.00003f72
mov ecx, dword [eax]
mov edi, ecx
imul edi, edi, 0x8088405
add eax, 4
mov edx, dword [eax]
inc edi
mov dword [esp + 0x10], edx
mov edx, edi
xor edx, ecx
add eax, 4
cmp edx, dword [esp + 0x10]
jne 0x47ec
mov edx, dword [eax]
mov ecx, edi
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esp + 0x10], edx
mov edx, ecx
xor edx, edi
add eax, 4
cmp edx, dword [esp + 0x10]
jne 0x4807
mov edx, dword [eax]
imul ecx, ecx, 0x8088405
push dword [esp + 0x24]
inc ecx
xor edx, ecx
imul ecx, ecx, 0x8088405
inc ecx
xor ecx, dword [eax + 4]
mov dword [esp + 0x14], edx
mov dword [esp + 0x24], ecx
call esi
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push ebx
push ebx
push 8
push ebx
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
cmp eax, ebx
mov dword [esp + 0x1c], eax
je 0x4822
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x20]
lea ecx, [ecx + esi + 0x14]
push ecx
push ebx
push ebx
push 1
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, ebx
mov dword [esp + 0x24], eax
je 0x4832
lea eax, [esi + eax + 0x14]
mov esi, dword [esp + 0x20]
cmp esi, ebx
mov dword [esp + 0x28], eax
jbe 0x4672
imul edi, edi, 0x343fd
add edi, 0x269ec3
mov ecx, edi
shr ecx, 0x10
xor byte [eax], cl
inc eax
dec esi
jne 0x465b
lea esi, [esp + 0x38]
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x38], ebx
call fcn.00003df1
test eax, eax
jne 0x4842
push 4
push 0x1000
push dword [esp + 0x18]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
call fcn.00003fbd
mov ecx, eax
sub ecx, dword [0x5015]
push 3
xor edx, edx
mov eax, ecx
pop edi
div edi
test ecx, 0xfffff000
je 0x46db
cmp edx, ebx
je 0x4883
cmp edx, 1
jne 0x4697
jmp 0x431a
mov eax, dword [esp + 0x20]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x48], eax
lea eax, [esp + 0x38]
push eax
mov dword [esp + 0x48], esi
call fcn.00002e41
cmp eax, 1
pop ecx
jne 0x485d
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00003fbd
mov ecx, eax
sub ecx, dword [0x5015]
push 3
xor edx, edx
mov eax, ecx
pop edi
div edi
test ecx, 0xfffff000
jne 0x457a
push esi
call fcn.00004078
cmp eax, ebx
pop ecx
je 0x4913
push eax
call fcn.00003fde
cmp eax, ebx
pop ecx
mov dword [esp + 0x28], eax
jne 0x4878
mov esi, 0x5019
push 0x10d1
mov eax, esi
call fcn.000049ee
push 0x12a9
jmp 0x490e
push 0x10bd
lea esi, [esp + 0x8c]
call fcn.000049b5
push 0x10
jmp 0x48e5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1181
lea esi, [esp + 0x8c]
mov edi, eax
call fcn.000049b5
push 0xa
mov eax, edi
jmp 0x48e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x11b1
jmp 0x47a1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x11fd
jmp 0x47a1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1211
jmp 0x47a1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1225
jmp 0x47a1
mov esi, 0x5019
push 0x10d1
mov eax, esi
call fcn.000049ee
push 0x1239
jmp 0x490e
mov esi, 0x5019
push 0x10d1
mov eax, esi
call fcn.000049ee
push 0x1249
jmp 0x490e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x1259
jmp 0x47a1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x126d
jmp 0x47a1
mov esi, 0x5019
push 0x10d1
mov eax, esi
call fcn.000049ee
push 0x1281
jmp 0x490e
mov esi, 0x5019
push 0x10d1
mov eax, esi
call fcn.000049ee
push 0x1291
jmp 0x490e
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [esp + 0x14], eax
push ebx
push ebx
push ebx
push 2
push ebx
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov esi, eax
cmp esi, ebx
jne 0x48a9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x12b9
jmp 0x47a1
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x30]
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x30]
lea eax, [ecx + eax + 0x14]
push eax
push esi
push dword [esp + 0x20]
call dword [esp + 0x38]
add esp, 0x10
jmp 0x4913
push 0x1195
lea esi, [esp + 0x8c]
call fcn.000049b5
push 0xa
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x8c]
call fcn.00004951
mov esi, 0x5019
push 0x10d1
mov eax, esi
call fcn.000049ee
lea eax, [esp + 0x88]
push eax
call fcn.000049b5
push 0x12cd
push 0x12d9
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
push 0x12f1
push 0x5019
push ebx
call eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret