Function at 0x140002dfc
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
Set environment variable
Terminate process

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x808]
sub rsp, 0x908
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 + 0x868], rdi
mov qword [rsp + 0x40], rdi
call fcn.140002494
mov rax, qword gs:[0x30]
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x110]
call qword [0x140007058]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [rbp + 0x850]
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 0x140002eb2
mov eax, 0xaaaaaaab
mul ecx
shr edx, 1
lea eax, [rdx + rdx*2]
sub ecx, eax
je 0x140003802
cmp ecx, 1
jmp 0x1400033cb
lea rcx, [0x140007090]
call fcn.1400029a4
call fcn.140002940
lea rcx, [rsp + 0x70]
call fcn.1400029a4
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 0x140002e96
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, [0x140001320]
call qword [0x140007010]
test rax, rax
setne r12b
test rax, rax
je 0x140002f4f
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rcx, rax
lea rdx, [0x140001190]
call qword [0x140007010]
test rax, rax
je 0x140002f4f
mov rcx, rbx
mov r14b, 1
call fcn.140003aec
test al, al
je 0x14000394f
jmp 0x140002f7a
movabs rax, 0x74636a6e696d7678
mov r14b, dil
cmp qword [rbx], rax
je 0x140002f7a
mov rcx, rbx
call fcn.1400039a8
test eax, eax
je 0x14000394f
cmp eax, 2
je 0x1400031b6
test rbx, rbx
je 0x1400031b6
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 0x140003696
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 0x14000368a
cmp dword [rax + 0x48], 0x3fc
jae 0x14000366b
mov r8d, dword [rax + 0x48]
lea rcx, [rbp + 8]
mov edx, dword [rax + 0x4c]
add r8, r8
add rdx, rax
call qword [0x140007038]
mov eax, dword [rbx + 0x48]
lea r8, [r15 + 0x43c8]
mov ecx, 0x10
mov word [rbp + rax*2 + 8], di
lea rax, [0x1400016b0]
cmp dword [r15], ecx
cmovb ecx, dword [r15]
mov eax, dword [rax + rcx*4]
add rax, r15
cmp r8, rax
ja 0x14000303a
mov edx, dword [r15 + 0x43cc]
lea rcx, [rsp + 0x70]
mov r8d, dword [r8]
add rdx, r15
call fcn.1400028ac
mov eax, dword [r15 + 0x40]
xor ecx, ecx
mov esi, ecx
test eax, eax
je 0x14000308c
cmp dword [r15 + 0x44], ecx
je 0x14000308c
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 0x140003095
lea rdx, [0x1400013b8]
or r8d, 0xffffffff
lea rcx, [0x140007090]
call fcn.1400028ac
jmp 0x14000394f
test r14b, r14b
jne 0x14000365f
mov eax, dword [r15 + 0x50]
test eax, eax
je 0x1400030d1
cmp dword [r15 + 0x54], ecx
je 0x1400030d1
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 r14d, r14d
mov rsi, rax
test rax, rax
jne 0x1400030dd
lea rdx, [0x1400013e8]
jmp 0x140003077
test r12b, r12b
jne 0x140003653
xor r14d, r14d
mov rax, qword gs:[0x30]
mov rcx, qword [rax + 0x60]
mov rbx, qword [rcx + 0x20]
test rdi, rdi
je 0x140003120
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], r14w
call qword [0x140007068]
xor edi, edi
test rsi, rsi
je 0x1400031db
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 [0x140007068]
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 0x1400031ab
xor edx, edx
lea rcx, [rbp - 0x80]
lea r8d, [rdx + 0x10]
call qword [0x140007030]
mov r8b, 1
lea rcx, [rbp - 0x80]
mov rdx, rdi
call qword [0x140007060]
test eax, eax
js 0x1400031af
mov rdx, qword [rbp - 0x78]
mov rcx, rbx
call qword [0x140007018]
xor edi, edi
jmp 0x1400031db
xor edi, edi
mov byte [rbx], dil
jmp 0x1400031db
mov r8d, 0x3fc
lea rdx, [rbp + 8]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x140003925
cmp eax, 0x3fc
je 0x140003925
cmp word [rbp + 8], 0x5c
jne 0x1400031ef
cmp word [rbp + 0xa], 0x5c
jne 0x1400031ef
lea rbx, [rbp + 8]
jmp 0x14000320a
mov r8d, 8
lea rdx, [0x1400016a0]
lea rcx, [rbp]
call qword [0x140007038]
lea rbx, [rbp]
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 0x140003249
mov eax, 0xaaaaaaab
mul r8d
shr edx, 1
lea ecx, [rdx + rdx*2]
sub r8d, ecx
je 0x140003802
mov r14, qword [rsp + 0x50]
jmp 0x1400033ba
or esi, 0xffffffff
lea rcx, [0x140007090]
mov r8d, esi
mov rdx, rbx
call fcn.1400028ac
mov r8d, esi
lea rdx, [0x14000127c]
lea rcx, [0x140007090]
call fcn.1400028ac
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 0x14000391c
call fcn.140003ebc
mov r14, qword [rsp + 0x50]
mov r12, qword [rbp + 0x868]
mov ebx, dword [rbp + 0x850]
test eax, eax
jne 0x140002e7a
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 0x140003913
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 0x14000390a
mov rcx, rax
call fcn.140002a1c
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 0x140003901
lea rcx, [rbx + r13]
cmp qword [rsp + 0x58], rcx
jle 0x1400038cf
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 0x1400038c6
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 0x1400033d6
mov eax, 0xaaaaaaab
mul r8d
shr edx, 1
lea ecx, [rdx + rdx*2]
sub r8d, ecx
je 0x140003802
mov r12, qword [rbp + 0x868]
cmp r8d, 1
mov ebx, dword [rbp + 0x850]
je 0x140002e7a
jmp 0x140003567
mov rcx, r13
call fcn.140002a1c
mov r11d, eax
add r11, r13
mov eax, dword [r11]
add r11, r12
cmp eax, 0x6d7678
jne 0x1400038ba
mov eax, dword [r11]
add r11, r12
cmp eax, 3
jne 0x1400038ae
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 0x1400038a2
imul ecx, ebx, 0x8088405
inc ecx
mov eax, ecx
xor eax, ebx
cmp eax, dword [r11]
jne 0x140003896
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 + 0x850], ecx
mov rcx, r13
inc eax
xor eax, dword [r11]
sub r11d, r13d
add r11d, r12d
mov dword [rbp + 0x858], eax
add edi, r11d
lea r12d, [rdi + rax]
mov dword [rbp + 0x860], r12d
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r14d, r14d
cmp dword [rsp + 0x78], r14d
jne 0x140003750
mov qword [rsp + 0x28], r14
lea r8d, [r14 + 8]
xor r9d, r9d
mov dword [rsp + 0x20], r14d
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov qword [rsp + 0x50], rax
mov r14, rax
test rax, rax
je 0x140003744
xor r9d, r9d
mov eax, r12d
xor r8d, r8d
mov qword [rsp + 0x20], rax
mov rcx, r14
lea edx, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov r13, rax
test rax, rax
je 0x140003738
mov r12d, edi
xor edi, edi
add r12, rax
mov eax, dword [rbp + 0x858]
mov qword [rbp + 0x868], r12
mov rcx, r12
test eax, eax
je 0x14000353b
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 0x14000351f
lea rcx, [rbp - 0x60]
mov qword [rbp - 0x30], rdi
mov qword [rbp - 0x28], rdi
mov qword [rbp - 0x20], rdi
mov dword [rbp - 0x58], edi
mov qword [rbp - 0x60], rdi
call fcn.140004270
mov ebx, eax
test eax, eax
jne 0x14000372f
mov ebx, dword [rbp + 0x850]
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 0x1400035c9
mov eax, 0xaaaaaaab
mul r8d
shr edx, 1
lea ecx, [rdx + rdx*2]
sub r8d, ecx
je 0x140003802
mov edi, 0
cmp r8d, 1
je 0x140002e7a
jmp 0x140003569
mov eax, dword [rbp + 0x858]
lea rcx, [rbp - 0x60]
mov edx, 4
mov dword [rbp - 0x58], eax
mov qword [rbp - 0x60], r12
mov dword [rbp - 0x48], ebx
mov qword [rbp - 0x50], rdi
call fcn.140004390
mov ebx, eax
cmp eax, 1
jne 0x140003711
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 0x1400036a2
mov eax, 0xaaaaaaab
mul r8d
shr edx, 1
lea ecx, [rdx + rdx*2]
sub r8d, ecx
je 0x140003802
cmp r8d, ebx
mov ebx, dword [rbp + 0x850]
jne 0x140003569
xor edi, edi
jmp 0x140002e7a
lea rdx, [0x140001400]
jmp 0x140003077
lea rdx, [0x1400013d0]
jmp 0x140003077
or r8d, 0xffffffff
lea rdx, [0x1400013a0]
lea rcx, [0x140007090]
call fcn.1400028ac
mov edx, dword [rbx + 0x48]
jmp 0x140003944
lea rdx, [0x140001388]
jmp 0x14000392c
lea rdx, [0x140001370]
jmp 0x14000392c
mov rcx, rdi
call fcn.140002b34
mov rbx, rax
test rax, rax
je 0x14000394f
mov edx, dword [rbp + 0x850]
mov r8d, 0x8000
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_VirtualFree]
lea rcx, [rbp - 0x70]
call fcn.1400029a4
mov rdx, rbx
lea rcx, [rbp - 0x70]
call fcn.140002738
mov rdx, qword [rbp - 0x70]
lea rcx, [0x1400015a8]
call qword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov rcx, rbx
call fcn.140002a68
mov rsi, rax
test rax, rax
jne 0x1400037f5
lea rdx, [0x1400015c0]
jmp 0x140003077
lea rdx, [0x140001578]
or r8d, 0xffffffff
lea rcx, [0x140007090]
call fcn.1400028ac
mov edx, ebx
jmp 0x140003944
lea rdx, [0x140001568]
jmp 0x140003718
lea rdx, [0x140001550]
jmp 0x14000392c
lea rdx, [0x140001538]
jmp 0x14000392c
mov rax, qword gs:[0x30]
mov rcx, qword [rax + 0x60]
mov rcx, qword [rcx + 0x110]
call qword [0x140007050]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword gs:[0x30]
mov edi, eax
mov rcx, qword [rcx + 0x60]
mov rcx, qword [rcx + 0x110]
call qword [0x140007058]
test rbx, rbx
jne 0x1400036cb
or r8d, 0xffffffff
lea rdx, [0x140001588]
lea rcx, [0x140007090]
call fcn.1400028ac
lea rcx, [rsp + 0x70]
call fcn.140002440
mov rdx, rax
lea rcx, [0x140007090]
or r8d, 0xffffffff
call fcn.1400028ac
or r8d, 0xffffffff
lea rdx, [0x1400015a0]
lea rcx, [0x140007090]
call fcn.1400028ac
mov edx, edi
jmp 0x140003944
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov r14, rax
jmp 0x14000380a
mov rsi, qword [rsp + 0x40]
mov r14, rsi
mov rdi, qword [rsp + 0x60]
xor r12d, r12d
mov qword [rsp + 0x28], r12
xor r9d, r9d
xor edx, edx
mov dword [rsp + 0x20], r12d
mov rcx, rdi
lea r8d, [r12 + 2]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov rbx, rax
test rax, rax
jne 0x140003843
lea rdx, [0x1400015d0]
jmp 0x14000392c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.140002970
mov r9d, dword [rbp + 0x860]
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, 0x908
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rdx, [0x140001528]
jmp 0x140003077
lea rdx, [0x140001518]
jmp 0x140003077
lea rdx, [0x140001508]
jmp 0x140003077
lea rdx, [0x1400014f8]
jmp 0x140003077
lea rdx, [0x1400014e0]
jmp 0x14000392c
or r8d, 0xffffffff
lea rdx, [0x1400014c8]
lea rcx, [0x140007090]
call fcn.1400028ac
mov edx, dword [rsp + 0x58]
mov r8d, 0xa
call fcn.1400027dc
lea rdx, [0x14000127c]
jmp 0x140003718
lea rdx, [0x1400014b0]
jmp 0x14000392c
lea rdx, [0x140001498]
jmp 0x14000392c
lea rdx, [0x140001480]
jmp 0x14000392c
lea rdx, [0x140001430]
jmp 0x14000392c
lea rdx, [0x140001418]
or r8d, 0xffffffff
lea rcx, [0x140007090]
call fcn.1400028ac
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov r8d, 0xa
call fcn.1400027dc
lea rcx, [0x1400015f8]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rcx, rax
lea rdx, [0x1400015e8]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
lea rcx, [0x140007090]
mov r10, rax
call fcn.140002440
mov rdx, rax
lea r8, [0x140001610]
mov r9d, 0x10
xor ecx, ecx
call r10
call fcn.140002970
or ecx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_ExitProcess]