Function at 0x140002c04
Capabilities:
Accept command line arguments
Check for time delay via gettickcount
Encode data using xor
Generate random numbers using the delphi lcg
Get file size
Read file via mapping
Terminate process

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x7e8]
sub rsp, 0x8e8
xor edi, edi
xor ecx, ecx
mov r15d, ecx
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x60], rcx
mov r14d, edi
mov qword [rsp + 0x50], rdi
mov r13d, edi
mov r12d, edi
mov qword [rbp + 0x848], rdi
mov qword [rsp + 0x40], rdi
call fcn.140002434
mov rax, qword gs:[0x30]
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x110]
call qword [0x140007050]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [rbp + 0x830]
mov dword [0x140007080], eax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
sub ecx, dword [0x140007080]
cmp ecx, 0x8000
jb 0x140002cba
mov eax, 0xaaaaaaab
mul ecx
shr edx, 1
lea eax, [rdx + rdx*2]
sub ecx, eax
je 0x140003491
cmp ecx, 1
jmp 0x140003176
lea rdx, [0x1400012b0]
mov dword [0x1400074a4], edi
mov word [0x140007090], di
call fcn.140002758
call qword [sym.imp.KERNEL32.dll_GetTickCount]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, eax
sub ecx, dword [0x140007080]
cmp ecx, 0x8000
jae 0x140002c9e
mov rax, qword gs:[0x30]
mov rbx, qword [rax + 0x60]
add rbx, 0xfe0
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rcx, rax
lea rdx, [0x140001340]
call qword [0x140007010]
test rax, rax
setne r12b
test rax, rax
je 0x140002d55
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rcx, rax
lea rdx, [0x1400011b8]
call qword [0x140007010]
test rax, rax
je 0x140002d55
mov rcx, rbx
mov r14b, 1
call fcn.140003778
test al, al
je 0x1400035f6
jmp 0x140002d80
movabs rax, 0x74636a6e696d7678
mov r14b, dil
cmp qword [rbx], rax
je 0x140002d80
mov rcx, rbx
call fcn.140003648
test eax, eax
je 0x1400035f6
cmp eax, 2
je 0x140002f78
test rbx, rbx
je 0x140002f78
movsxd rcx, dword [rbx + 0x18]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rdi
lea edx, [r9 + 6]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r15, rax
test rax, rax
je 0x14000342b
movsxd rcx, dword [rax + 0x1c]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rdi
lea edx, [r9 + 6]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [rsp + 0x68], rax
mov rbx, rax
test rax, rax
je 0x14000341f
cmp dword [rax + 0x48], 0x3fc
jae 0x14000340b
mov r8d, dword [rax + 0x48]
lea rcx, [rbp - 0x18]
mov edx, dword [rax + 0x4c]
add r8, r8
add rdx, rax
call qword [0x140007038]
mov eax, dword [rbx + 0x48]
xor ecx, ecx
mov esi, ecx
mov word [rbp + rax*2 - 0x18], di
mov eax, dword [r15 + 0x40]
test eax, eax
je 0x140002e4b
cmp dword [r15 + 0x44], ecx
je 0x140002e4b
lea ebx, [rax + 1]
add rbx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
xor ecx, ecx
mov rdi, rax
test rax, rax
jne 0x140002e54
lea rdx, [0x1400013d8]
call fcn.140002758
jmp 0x1400035f6
test r14b, r14b
jne 0x1400033ff
mov eax, dword [r15 + 0x50]
test eax, eax
je 0x140002e90
cmp dword [r15 + 0x54], ecx
je 0x140002e90
lea ebx, [rax + 1]
add rbx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
xor r12d, r12d
mov rsi, rax
test rax, rax
jne 0x140002e9c
lea rdx, [0x140001408]
jmp 0x140002e41
test r12b, r12b
jne 0x1400033f3
xor r12d, r12d
mov rax, qword gs:[0x30]
mov rcx, qword [rax + 0x60]
mov rbx, qword [rcx + 0x20]
test rdi, rdi
je 0x140002edf
mov r8d, dword [r15 + 0x40]
mov rcx, rdi
mov edx, dword [r15 + 0x44]
add r8, r8
add rdx, r15
call qword [0x140007038]
mov eax, dword [r15 + 0x40]
lea rcx, [rbx + 0x60]
mov rdx, rdi
mov word [rdi + rax*2], r12w
call qword [0x140007060]
xor edi, edi
test rsi, rsi
je 0x140002f9d
mov r8d, dword [r15 + 0x50]
mov rcx, rsi
mov edx, dword [r15 + 0x54]
add r8, r8
add rdx, r15
call qword [0x140007038]
mov eax, dword [r15 + 0x50]
mov rdx, rsi
mov word [rsi + rax*2], di
lea rdi, [rbx + 0x70]
mov rcx, rdi
call qword [0x140007060]
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rcx, rax
mov rdx, rsi
call qword [section..data]
call qword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov rbx, rax
test rax, rax
je 0x140002f6d
xor edx, edx
lea rcx, [rsp + 0x70]
lea r8d, [rdx + 0x10]
call qword [0x140007030]
mov r8b, 1
lea rcx, [rsp + 0x70]
mov rdx, rdi
call qword [0x140007058]
test eax, eax
js 0x140002f71
mov rdx, qword [rsp + 0x78]
mov rcx, rbx
call qword [0x140007018]
xor edi, edi
jmp 0x140002f9d
xor edi, edi
mov byte [rbx], dil
jmp 0x140002f9d
mov r8d, 0x3fc
lea rdx, [rbp - 0x18]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x1400035d7
cmp eax, 0x3fc
je 0x1400035d7
cmp word [rbp - 0x18], 0x5c
jne 0x140002fb1
cmp word [rbp - 0x16], 0x5c
jne 0x140002fb1
lea rbx, [rbp - 0x18]
jmp 0x140002fcc
mov r8d, 8
lea rdx, [0x140001690]
lea rcx, [rbp - 0x20]
call qword [0x140007038]
lea rbx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, eax
sub r8d, dword [0x140007080]
cmp r8d, 0x8000
jb 0x14000300b
mov eax, 0xaaaaaaab
mul r8d
shr edx, 1
lea ecx, [rdx + rdx*2]
sub r8d, ecx
je 0x140003491
mov r14, qword [rsp + 0x50]
jmp 0x140003165
mov rdx, rbx
call fcn.140002758
lea rdx, [0x1400012a4]
call fcn.140002758
xor r9d, r9d
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], edi
mov edx, 0x80000000
mov rcx, rbx
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 7]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x60], rax
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x1400035ce
call fcn.140003b48
mov r14, qword [rsp + 0x50]
mov r12, qword [rbp + 0x848]
mov ebx, dword [rbp + 0x830]
test eax, eax
jne 0x140002c82
xor r9d, r9d
mov qword [rsp + 0x28], rdi
xor edx, edx
mov dword [rsp + 0x20], edi
mov rcx, rsi
lea r8d, [r9 + 2]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov qword [rsp + 0x50], rax
mov r14, rax
test rax, rax
je 0x1400035c5
xor r9d, r9d
mov r13d, 0x1000
xor r8d, r8d
mov qword [rsp + 0x20], r13
mov rcx, rax
lea r12d, [r9 + 4]
mov edx, r12d
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r11, rax
test rax, rax
je 0x1400035bc
mov rcx, rax
call fcn.14000283c
mov rcx, r11
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
lea rdx, [rsp + 0x58]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x1400035b3
lea rcx, [rbx + r13]
cmp qword [rsp + 0x58], rcx
jle 0x14000358c
lea ecx, [rbx + 0x1000]
xor r9d, r9d
mov qword [rsp + 0x20], rcx
xor r8d, r8d
mov rcx, r14
mov edx, r12d
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r13, rax
test rax, rax
je 0x140003583
call qword [sym.imp.KERNEL32.dll_GetTickCount]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, eax
sub r8d, dword [0x140007080]
cmp r8d, 0x8000
jb 0x140003181
mov eax, 0xaaaaaaab
mul r8d
shr edx, 1
lea ecx, [rdx + rdx*2]
sub r8d, ecx
je 0x140003491
mov r12, qword [rbp + 0x848]
cmp r8d, 1
mov ebx, dword [rbp + 0x830]
je 0x140002c82
jmp 0x140003307
mov rcx, r13
call fcn.14000283c
mov r11d, eax
add r11, r13
mov eax, dword [r11]
add r11, r12
cmp eax, 0x6d7678
jne 0x140003577
mov eax, dword [r11]
add r11, r12
cmp eax, 3
jne 0x14000356b
mov edx, dword [r11]
add r11, r12
imul ebx, edx, 0x8088405
mov ecx, dword [r11]
add r11, r12
inc ebx
mov eax, ebx
xor eax, edx
cmp eax, ecx
jne 0x14000355f
imul ecx, ebx, 0x8088405
inc ecx
mov eax, ecx
xor eax, ebx
cmp eax, dword [r11]
jne 0x140003553
imul eax, ecx, 0x2b9ad7e7
add r11, 8
mov ecx, 0x8088406
sub ecx, eax
imul eax, ecx, 0x8088405
mov edi, ecx
xor edi, dword [r11]
add r11, r12
inc eax
mov ecx, eax
imul eax, eax, 0x8088405
xor ecx, dword [r11]
add r11, r12
mov dword [rbp + 0x830], ecx
mov rcx, r13
inc eax
xor eax, dword [r11]
sub r11d, r13d
add r11d, r12d
mov dword [rbp + 0x838], eax
add edi, r11d
lea r12d, [rdi + rax]
mov dword [rbp + 0x840], r12d
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r13d, r13d
xor r9d, r9d
mov qword [rsp + 0x28], r13
xor edx, edx
mov rcx, rsi
mov dword [rsp + 0x20], r13d
lea r8d, [r13 + 8]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov qword [rsp + 0x50], rax
mov r14, rax
test rax, rax
je 0x140003547
mov eax, r12d
lea edx, [r13 + 1]
xor r9d, r9d
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r13, rax
test rax, rax
je 0x14000353b
mov r12d, edi
xor edi, edi
add r12, rax
mov eax, dword [rbp + 0x838]
mov qword [rbp + 0x848], r12
mov rcx, r12
test eax, eax
je 0x1400032db
mov edx, eax
imul ebx, ebx, 0x343fd
add ebx, 0x269ec3
mov eax, ebx
shr eax, 0x10
xor byte [rcx], al
inc rcx
sub rdx, 1
jne 0x1400032bf
lea rcx, [rbp - 0x80]
mov qword [rbp - 0x50], rdi
mov qword [rbp - 0x48], rdi
mov qword [rbp - 0x40], rdi
mov dword [rbp - 0x78], edi
mov qword [rbp - 0x80], rdi
call fcn.140003f00
mov ebx, eax
test eax, eax
jne 0x140003532
mov ebx, dword [rbp + 0x830]
mov esi, ebx
mov r9d, 4
mov r8d, 0x1000
mov rdx, rsi
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetTickCount]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, eax
sub r8d, dword [0x140007080]
cmp r8d, 0x8000
jb 0x140003369
mov eax, 0xaaaaaaab
mul r8d
shr edx, 1
lea ecx, [rdx + rdx*2]
sub r8d, ecx
je 0x140003491
mov edi, 0
cmp r8d, 1
je 0x140002c82
jmp 0x140003309
mov eax, dword [rbp + 0x838]
lea rcx, [rbp - 0x80]
mov edx, 4
mov dword [rbp - 0x78], eax
mov qword [rbp - 0x80], r12
mov dword [rbp - 0x68], ebx
mov qword [rbp - 0x70], rdi
call fcn.140004020
mov ebx, eax
cmp eax, 1
jne 0x14000351f
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, eax
sub r8d, dword [0x140007080]
cmp r8d, 0x8000
jb 0x140003437
mov eax, 0xaaaaaaab
mul r8d
shr edx, 1
lea ecx, [rdx + rdx*2]
sub r8d, ecx
je 0x140003491
cmp r8d, ebx
mov ebx, dword [rbp + 0x830]
jne 0x140003309
xor edi, edi
jmp 0x140002c82
lea rdx, [0x140001420]
jmp 0x140002e41
lea rdx, [0x1400013f0]
jmp 0x140002e41
lea rdx, [0x1400013c0]
call fcn.140002758
mov edx, dword [rbx + 0x48]
jmp 0x1400035eb
lea rdx, [0x1400013a8]
jmp 0x1400035de
lea rdx, [0x140001390]
jmp 0x1400035de
mov rcx, rdi
call fcn.140002954
mov r8d, 0x8000
mov rdx, rsi
mov rcx, rdi
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_VirtualFree]
xor r12d, r12d
test rbx, rbx
je 0x1400035f6
mov rcx, rbx
call fcn.140003ae8
mov rcx, rbx
call fcn.140002888
mov rsi, rax
test rax, rax
jne 0x140003484
lea rdx, [0x1400015b0]
jmp 0x140002e41
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov r14, rax
jmp 0x14000349c
mov rsi, qword [rsp + 0x40]
xor r12d, r12d
mov r14, rsi
mov rdi, qword [rsp + 0x60]
xor r9d, r9d
mov qword [rsp + 0x28], r12
xor edx, edx
mov rcx, rdi
mov dword [rsp + 0x20], r12d
lea r8d, [r9 + 2]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov rbx, rax
test rax, rax
jne 0x1400034d1
lea rdx, [0x1400015c0]
jmp 0x1400035de
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r9d, dword [rbp + 0x840]
mov rdx, rbx
mov rax, qword [rsp + 0x68]
add r9d, 0xffff
mov r8, qword [rsp + 0x58]
and r9d, 0xffff0000
mov qword [rsp + 0x28], rax
mov rcx, r14
mov qword [rsp + 0x20], r15
call rsi
add rsp, 0x8e8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rdx, [0x140001598]
call fcn.140002758
mov edx, ebx
jmp 0x1400035eb
lea rdx, [0x140001588]
jmp 0x140003526
lea rdx, [0x140001570]
jmp 0x1400035de
lea rdx, [0x140001558]
jmp 0x1400035de
lea rdx, [0x140001548]
jmp 0x140002e41
lea rdx, [0x140001538]
jmp 0x140002e41
lea rdx, [0x140001528]
jmp 0x140002e41
lea rdx, [0x140001518]
jmp 0x140002e41
lea rdx, [0x140001500]
jmp 0x1400035de
lea rdx, [0x1400014e8]
call fcn.140002758
mov edx, dword [rsp + 0x58]
mov r8d, 0xa
call fcn.1400026b4
lea rdx, [0x1400012a4]
jmp 0x140003526
lea rdx, [0x1400014d0]
jmp 0x1400035de
lea rdx, [0x1400014b8]
jmp 0x1400035de
lea rdx, [0x1400014a0]
jmp 0x1400035de
lea rdx, [0x140001450]
jmp 0x1400035de
lea rdx, [0x140001438]
call fcn.140002758
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov r8d, 0xa
call fcn.1400026b4
lea rcx, [0x1400015e8]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rcx, rax
lea rdx, [0x1400015d8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rcx, [0x140007090]
mov r10, rax
call fcn.1400023e0
mov rdx, rax
lea r8, [0x140001600]
mov r9d, 0x10
xor ecx, ecx
call r10
or ecx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_ExitProcess]