Function at 0xbc04229
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xca4
push ebx
push esi
push edi
call fcn.0bc03da5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
and eax, 0x11
xor ebx, ebx
cmp eax, 0x111
je 0xbc04598
lea eax, [esp + 0x28]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call fcn.0bc03e46
pop ecx
call fcn.0bc03ec1
mov ecx, eax
sub ecx, dword [0xbc0500c]
push 3
xor edx, edx
mov eax, ecx
pop esi
mov edi, 0xffff8000
div esi
test edi, ecx
jne 0xbc0447b
mov dword [esp + 0x894], ebx
mov word [esp + 0x480], bx
mov dword [esp + 0x47c], ebx
mov word [esp + 0x68], bx
call fcn.0bc03ec1
mov ecx, eax
sub ecx, dword [0xbc0500c]
xor edx, edx
mov eax, ecx
div esi
test edi, ecx
jne 0xbc0447b
push 0xbc01094
lea eax, [esp + 0x89c]
call fcn.0bc048e4
push 0x10
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea ecx, [esp + 0x89c]
call fcn.0bc0482c
push 0xbc010ac
mov esi, ecx
call fcn.0bc04890
mov eax, dword [esp + 0x28]
push 0x10
mov ecx, esi
call fcn.0bc0482c
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 + 0x2c], eax
je 0xbc04353
push ebx
push ebx
push ebx
push 4
push esi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
cmp edi, ebx
je 0xbc0467f
lea eax, [edi + 4]
push eax
lea eax, [esp + 0x484]
call fcn.0bc048c9
push edi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, 0xffff8000
jmp 0xbc04383
cmp eax, 2
jne 0xbc047b6
push 0x104
lea eax, [esp + 0x484]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x480]
call fcn.0bc0481b
mov dword [esp + 0x894], eax
call fcn.0bc03ec1
mov ecx, eax
sub ecx, dword [0xbc0500c]
push 3
xor edx, edx
mov eax, ecx
pop esi
div esi
test edi, ecx
jne 0xbc0447b
lea eax, [esp + 0x480]
push eax
lea esi, [esp + 0x6c]
call fcn.0bc04890
push 0xbc0116c
call fcn.0bc04890
push ebx
push ebx
push 3
push ebx
push 7
push 0x80000000
lea eax, [esp + 0x498]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
je 0xbc0469c
call fcn.0bc03e10
test eax, eax
jne 0xbc04253
push ebx
push ebx
push ebx
push 2
push ebx
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
cmp eax, ebx
mov dword [esp + 0x18], eax
je 0xbc046a9
push 0x1000
push ebx
push ebx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
cmp esi, ebx
je 0xbc046b6
mov edi, esi
call fcn.0bc03dde
mov edi, eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [esp + 0x28], edi
call esi
add edi, 0x1000
push edi
push ebx
push ebx
push 4
push dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
cmp eax, ebx
mov dword [esp + 0x1c], eax
je 0xbc046c3
call fcn.0bc03ec1
mov ecx, eax
sub ecx, dword [0xbc0500c]
push 3
xor edx, edx
mov eax, ecx
pop edi
div edi
test ecx, 0xffff8000
je 0xbc04491
cmp edx, ebx
je 0xbc04767
cmp edx, 1
je 0xbc04253
jmp 0xbc04598
mov edi, dword [esp + 0x1c]
call fcn.0bc03e76
mov ecx, dword [eax]
mov edi, ecx
imul edi, edi, 0x8088405
add eax, 4
mov edx, dword [eax]
inc edi
mov dword [esp + 0xc], edx
mov edx, edi
xor edx, ecx
add eax, 4
cmp edx, dword [esp + 0xc]
jne 0xbc046d0
mov edx, dword [eax]
mov ecx, edi
imul ecx, ecx, 0x8088405
inc ecx
mov dword [esp + 0xc], edx
mov edx, ecx
xor edx, edi
add eax, 4
cmp edx, dword [esp + 0xc]
jne 0xbc046eb
mov edx, dword [eax]
imul ecx, ecx, 0x8088405
push dword [esp + 0x1c]
inc ecx
xor edx, ecx
imul ecx, ecx, 0x8088405
inc ecx
xor ecx, dword [eax + 4]
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], ecx
call esi
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push ebx
push ebx
push 8
push ebx
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
cmp eax, ebx
mov dword [esp + 0x18], eax
je 0xbc04706
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
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 + 0x1c], eax
je 0xbc04716
lea eax, [esi + eax + 0x14]
mov esi, dword [esp + 0x14]
cmp esi, ebx
mov dword [esp + 0x20], eax
jbe 0xbc04573
imul edi, edi, 0x343fd
add edi, 0x269ec3
mov ecx, edi
shr ecx, 0x10
xor byte [eax], cl
inc eax
dec esi
jne 0xbc0455c
lea esi, [esp + 0x30]
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], ebx
call fcn.0bc03d30
test eax, eax
jne 0xbc04726
push 4
push 0x1000
push dword [esp + 0x14]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
call fcn.0bc03ec1
mov ecx, eax
sub ecx, dword [0xbc0500c]
push 3
xor edx, edx
mov eax, ecx
pop edi
div edi
test ecx, 0xffff8000
je 0xbc045dc
cmp edx, ebx
je 0xbc04767
cmp edx, 1
jne 0xbc04598
jmp 0xbc04253
mov eax, dword [esp + 0x14]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x30]
push eax
mov dword [esp + 0x40], esi
call fcn.0bc02d80
cmp eax, 1
pop ecx
jne 0xbc04741
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.0bc03ec1
mov ecx, eax
sub ecx, dword [0xbc0500c]
push 3
xor edx, edx
mov eax, ecx
pop edi
div edi
test ecx, 0xffff8000
jne 0xbc0447b
push esi
call fcn.0bc03f7c
cmp eax, ebx
pop ecx
je 0xbc047ee
push eax
call fcn.0bc03ee2
cmp eax, ebx
pop ecx
mov dword [esp + 0xc], eax
jne 0xbc0475c
mov esi, 0xbc05010
push 0xbc010c8
mov eax, esi
call fcn.0bc048c9
push 0xbc0126c
jmp 0xbc047e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xbc010b4
lea esi, [esp + 0x6c]
mov edi, eax
call fcn.0bc04890
mov eax, edi
jmp 0xbc047c8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xbc01174
jmp 0xbc0468a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xbc011c0
jmp 0xbc0468a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xbc011d4
jmp 0xbc0468a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xbc011e8
jmp 0xbc0468a
mov esi, 0xbc05010
push 0xbc010c8
mov eax, esi
call fcn.0bc048c9
push 0xbc011fc
jmp 0xbc047e9
mov esi, 0xbc05010
push 0xbc010c8
mov eax, esi
call fcn.0bc048c9
push 0xbc0120c
jmp 0xbc047e9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xbc0121c
jmp 0xbc0468a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xbc01230
jmp 0xbc0468a
mov esi, 0xbc05010
push 0xbc010c8
mov eax, esi
call fcn.0bc048c9
push 0xbc01244
jmp 0xbc047e9
mov esi, 0xbc05010
push 0xbc010c8
mov eax, esi
call fcn.0bc048c9
push 0xbc01254
jmp 0xbc047e9
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [esp + 0x20], eax
push ebx
push ebx
push ebx
push 2
push ebx
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov esi, eax
cmp esi, ebx
jne 0xbc0478d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xbc0127c
jmp 0xbc0468a
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
lea eax, [ecx + eax + 0x14]
push eax
push esi
push dword [esp + 0x2c]
call dword [esp + 0x1c]
add esp, 0x10
jmp 0xbc047ee
push 0xbc01158
lea esi, [esp + 0x6c]
call fcn.0bc04890
mov eax, dword [esp + 0x2c]
push 0xa
lea ecx, [esp + 0x6c]
call fcn.0bc0482c
mov esi, 0xbc05010
push 0xbc010c8
mov eax, esi
call fcn.0bc048c9
lea eax, [esp + 0x68]
push eax
call fcn.0bc04890
push 0xbc01290
push 0xbc0129c
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
push 0xbc012b8
push 0xbc05010
push ebx
call eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret