Function at 0x1293b
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
Resolve function by parsing pe exports
Set environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x8a4
xor edx, edx
push ebx
push esi
push edi
mov dword [esp + 0x14], edx
mov dword [esp + 0x40], edx
mov dword [esp + 0x34], edx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x44], edx
call fcn.00012355
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push dword [eax + 0xa0]
call dword [0x1602c]
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
call esi
push 3
pop edi
mov dword [0x16040], eax
mov dword [esp + 0x54], edi
jmp 0x129a1
push 3
pop edi
mov ebx, 0x16044
call fcn.000136d3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x16040]
mov eax, ecx
div edi
cmp ecx, 0x8000
jb 0x129f6
test edx, edx
jne 0x12ecc
mov edi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x34]
xor eax, eax
push eax
push eax
push eax
push 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov esi, eax
test esi, esi
jne 0x13289
push 0xffffffffffffffff
push 0x11528
jmp 0x13137
mov ecx, ebx
call fcn.000125f7
push ecx
call fcn.000125b8
lea ecx, [esp + 0x58]
call fcn.000125f7
call fcn.000136d3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x16040]
mov eax, ecx
div edi
cmp ecx, 0x8000
jae 0x129c1
call fcn.0001367a
push 0x112c0
lea esi, [eax + 0xfe0]
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [0x16008]
test eax, eax
pop ecx
setne byte [esp + 0x1f]
pop ecx
test eax, eax
je 0x12a81
push 0x11180
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [0x16008]
pop ecx
pop ecx
test eax, eax
je 0x12a81
mov ecx, esi
mov byte [esp + 0x13], 1
call fcn.000133ab
test al, al
je 0x1336d
xor ecx, ecx
jmp 0x12aa0
xor ecx, ecx
cmp dword [esi], 0x696d7678
mov byte [esp + 0x13], cl
jne 0x12d2d
cmp dword [esi + 4], 0x74636a6e
jne 0x12d2d
test esi, esi
je 0x12d2d
push ecx
push ecx
push ecx
push 6
push dword [esi + 0x18]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
mov dword [esp + 0x14], edi
test edi, edi
je 0x1313e
xor eax, eax
push eax
push eax
push eax
push 6
push dword [edi + 0x1c]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
mov dword [esp + 0x40], ebx
test ebx, ebx
je 0x13130
mov ecx, dword [ebx + 0x48]
cmp ecx, 0x3fc
jae 0x13113
mov eax, dword [ebx + 0x4c]
add ecx, ecx
push ecx
add eax, ebx
push eax
lea eax, [esp + 0xc0]
push eax
call dword [0x1601c]
mov eax, dword [ebx + 0x48]
add esp, 0xc
xor ecx, ecx
mov word [esp + eax*2 + 0xb8], cx
lea eax, [edi + 0x43c8]
push 0xf
pop ecx
cmp dword [edi], ecx
cmovb ecx, dword [edi]
mov ecx, dword [ecx*4 + 0x115f0]
add ecx, edi
cmp eax, ecx
ja 0x12b4b
mov eax, dword [edi + 0x43c4]
lea ecx, [esp + 0x58]
push dword [edi + 0x43c0]
add eax, edi
push eax
call fcn.00012558
mov eax, dword [edi + 0x40]
xor esi, esi
xor ebx, ebx
mov dword [esp + 0x24], esi
test eax, eax
je 0x12b93
cmp dword [edi + 0x44], ebx
je 0x12b93
lea eax, [eax*2 + 2]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
jne 0x12b9d
push 0xffffffffffffffff
push 0x1134c
mov ebx, 0x16044
mov ecx, ebx
call fcn.00012558
jmp 0x1336d
cmp byte [esp + 0x13], bl
jne 0x13107
mov eax, dword [edi + 0x50]
test eax, eax
je 0x12bd3
cmp dword [edi + 0x54], esi
je 0x12bd3
lea eax, [eax*2 + 2]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [esp + 0x24], esi
test esi, esi
jne 0x12bde
push 0xffffffffffffffff
push 0x11374
jmp 0x12b82
cmp byte [esp + 0x1b], 0
jne 0x130fb
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov edi, dword [eax + 0x10]
test ebx, ebx
je 0x12c20
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 0x40]
add eax, eax
push eax
mov eax, dword [ecx + 0x44]
add eax, ecx
push eax
push ebx
call dword [0x1601c]
mov eax, dword [esp + 0x20]
add esp, 0xc
xor ecx, ecx
mov eax, dword [eax + 0x40]
push ebx
mov word [ebx + eax*2], cx
lea eax, [edi + 0x38]
push eax
call dword [0x16034]
test esi, esi
je 0x12cb0
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 0x50]
add eax, eax
push eax
mov eax, dword [ecx + 0x54]
add eax, ecx
push eax
push esi
call dword [0x1601c]
mov eax, dword [esp + 0x20]
add esp, 0xc
xor ecx, ecx
add edi, 0x40
mov eax, dword [eax + 0x50]
push esi
push edi
mov word [esi + eax*2], cx
call dword [0x16034]
push esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [section..data]
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, eax
test esi, esi
je 0x12cac
push 8
lea eax, [esp + 0x68]
push 0
push eax
call dword [0x16018]
add esp, 0xc
lea eax, [esp + 0x64]
push 1
push edi
push eax
call dword [0x16030]
test eax, eax
js 0x12ca9
push dword [esp + 0x68]
push esi
call dword [0x1600c]
pop ecx
pop ecx
jmp 0x12cac
mov byte [esi], 0
mov esi, dword [esp + 0x24]
call fcn.000136b6
test al, al
je 0x12d56
call fcn.0001367a
xor edx, edx
mov ecx, dword [eax + 0x20]
cmp dword [eax + 0x24], edx
ja 0x12d56
jb 0x12cda
cmp ecx, 0x7fff0000
jae 0x12d56
test ebx, ebx
je 0x12d02
mov dword [ecx + 0x68], ebx
mov ebx, dword [esp + 0x14]
mov dword [ecx + 0x6c], edx
mov ax, word [ebx + 0x40]
add ax, ax
mov word [ecx + 0x60], ax
mov ax, word [ebx + 0x40]
inc ax
add ax, ax
mov word [ecx + 0x62], ax
jmp 0x12d06
mov ebx, dword [esp + 0x14]
push 3
pop edi
test esi, esi
je 0x12d59
mov dword [ecx + 0x78], esi
mov dword [ecx + 0x7c], edx
mov ax, word [ebx + 0x50]
add ax, ax
mov word [ecx + 0x70], ax
mov ax, word [ebx + 0x50]
inc ax
add ax, ax
mov word [ecx + 0x72], ax
jmp 0x12d59
mov esi, 0x3fc
lea eax, [esp + 0xb8]
push esi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x12d4a
cmp eax, esi
jne 0x12d5e
push 0xffffffffffffffff
push 0x1139c
jmp 0x13145
push 3
pop edi
mov ebx, 0x16044
push 0x5c
pop eax
cmp word [esp + 0xb8], ax
jne 0x12d7e
cmp word [esp + 0xba], ax
jne 0x12d7e
lea esi, [esp + 0xb8]
jmp 0x12d9d
push 8
lea eax, [esp + 0xb4]
push 0x115e0
push eax
call dword [0x1601c]
add esp, 0xc
lea esi, [esp + 0xb0]
call fcn.000136d3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x16040]
mov eax, ecx
div edi
cmp ecx, 0x8000
jae 0x129c1
push 0xffffffffffffffff
push esi
mov ecx, ebx
call fcn.00012558
push 0xffffffffffffffff
push 0x113b0
mov ecx, ebx
call fcn.00012558
xor eax, eax
push eax
push eax
push edi
push eax
push 7
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [esp + 0x34], ebx
cmp ebx, 0xffffffff
je 0x1335c
call fcn.000136f4
test eax, eax
jne 0x129a1
push eax
push eax
push eax
push 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov edi, eax
mov dword [esp + 0x2c], edi
test edi, edi
je 0x13350
push 0x1000
push 0
push 0
push 4
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, eax
test ecx, ecx
je 0x13344
call fcn.00012638
push ecx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
lea eax, [esp + 0x48]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x13338
xor eax, eax
mov ecx, esi
push eax
add ecx, 0x1000
pop edx
adc eax, edx
cmp dword [esp + 0x4c], eax
jl 0x13302
jg 0x12e81
cmp dword [esp + 0x48], ecx
jbe 0x13302
lea eax, [esi + 0x1000]
push eax
push edx
push edx
push 4
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
mov dword [esp + 0x28], ebx
test ebx, ebx
je 0x132f6
call fcn.000136d3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x16040]
push 3
mov eax, ecx
pop edi
div edi
cmp ecx, 0x8000
jb 0x12eda
test edx, edx
je 0x129c9
mov ebx, 0x16044
cmp edx, 1
je 0x129a6
jmp 0x13040
mov ecx, ebx
call fcn.00012638
push 4
lea esi, [ebx + eax]
mov ecx, dword [esi]
pop ebx
add esi, ebx
cmp ecx, 0x6d7678
jne 0x132ea
mov ecx, dword [esi]
add esi, ebx
cmp ecx, edi
jne 0x132de
mov edx, dword [esi]
add esi, ebx
imul edi, edx, 0x8088405
mov ecx, dword [esi]
add esi, ebx
inc edi
mov eax, edi
xor eax, edx
cmp eax, ecx
jne 0x132d2
mov ecx, dword [esi]
add esi, ebx
imul edx, edi, 0x8088405
inc edx
mov eax, edx
xor eax, edi
cmp eax, ecx
jne 0x132c6
mov ecx, dword [esi]
add esi, ebx
imul eax, edx, 0x8088405
mov dword [esp + 0x20], 0x8088406
mov edx, dword [esi]
lea ebx, [esi + 8]
inc eax
xor ecx, eax
imul eax, eax, 0x8088405
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x28]
sub ebx, ecx
add ebx, 4
push ecx
inc eax
xor edx, eax
imul eax, eax, 0x2b9ad7e7
mov dword [esp + 0x3c], edx
sub dword [esp + 0x24], eax
mov eax, dword [esp + 0x24]
xor eax, dword [esi + 8]
add eax, ebx
add eax, edx
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x5c], 0
jne 0x131f5
xor eax, eax
push eax
push eax
push eax
push 8
push eax
push dword [esp + 0x48]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ecx, eax
mov dword [esp + 0x2c], ecx
test ecx, ecx
je 0x131e9
mov esi, dword [esp + 0x38]
lea eax, [ebx + esi]
push eax
push 0
push 0
push 1
push ecx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, eax
mov dword [esp + 0x28], ecx
test ecx, ecx
je 0x131dd
lea eax, [ebx + ecx]
mov dword [esp + 0x3c], eax
mov ecx, eax
test esi, esi
je 0x13009
mov edx, esi
imul edi, edi, 0x343fd
add edi, 0x269ec3
mov eax, edi
shr eax, 0x10
xor byte [ecx], al
inc ecx
sub edx, 1
jne 0x12ff0
xor eax, eax
push ecx
lea ecx, [esp + 0x7c]
mov dword [esp + 0x9c], eax
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x7c], eax
call fcn.00013a30
mov esi, eax
pop ecx
test esi, esi
jne 0x131cc
mov ebx, dword [esp + 0x28]
mov esi, dword [esp + 0x30]
push 4
push 0x1000
push esi
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
call fcn.000136d3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x16040]
mov eax, ecx
div dword [esp + 0x54]
cmp ecx, 0x8000
jb 0x13089
test edx, edx
je 0x129c9
cmp edx, 1
jne 0x13048
jmp 0x1299e
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x78]
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x3c]
push 4
pop edx
mov dword [esp + 0x78], eax
mov dword [esp + 0x88], esi
mov dword [esp + 0x84], edi
call fcn.00013b40
mov esi, eax
cmp esi, 1
jne 0x131c3
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.000136d3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x16040]
push 3
mov eax, ecx
pop esi
div esi
cmp ecx, 0x8000
jb 0x13161
test edx, edx
je 0x129c9
mov esi, dword [esp + 0x30]
jmp 0x1307f
push 0xffffffffffffffff
push 0x11388
jmp 0x12b82
push 0xffffffffffffffff
push 0x11360
jmp 0x12b82
push 0xffffffffffffffff
push 0x11338
mov ecx, 0x16044
call fcn.00012558
push 0xa
push dword [ebx + 0x48]
mov ebx, 0x16044
jmp 0x13155
push 0xffffffffffffffff
push 0x11324
mov ebx, 0x16044
jmp 0x13145
push 0xffffffffffffffff
push 0x11310
mov ecx, ebx
call fcn.00012558
push 0xa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, ebx
call fcn.000124da
jmp 0x1336d
mov ecx, edi
call fcn.000126f7
mov esi, eax
test esi, esi
je 0x13368
push 0x8000
push dword [esp + 0x34]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
lea ecx, [esp + 0x6c]
call fcn.000125f7
push 0x10
push esi
lea ecx, [esp + 0x74]
call fcn.000124da
push dword [esp + 0x6c]
push 0x11504
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ecx, esi
call fcn.0001266e
mov edi, eax
test edi, edi
jne 0x13278
push 0xffffffffffffffff
push 0x11518
jmp 0x12b82
push 0xffffffffffffffff
push 0x114dc
jmp 0x131d3
push 0xffffffffffffffff
push 0x114d0
mov ebx, 0x16044
jmp 0x13329
push 0xffffffffffffffff
push 0x114bc
jmp 0x13137
push 0xffffffffffffffff
push 0x114a8
jmp 0x13137
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push dword [eax + 0xa0]
call dword [0x16028]
push dword [esp + 0x58]
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword fs:[0x18]
mov edi, eax
mov ecx, dword [ecx + 0x30]
push dword [ecx + 0xa0]
call dword [0x1602c]
test esi, esi
jne 0x13182
push 0xffffffffffffffff
mov ebx, 0x16044
push 0x114e8
mov ecx, ebx
call fcn.00012558
push 0xffffffffffffffff
lea ecx, [esp + 0x5c]
call fcn.00012330
push eax
mov ecx, ebx
call fcn.00012558
push 0xffffffffffffffff
push 0x114fc
mov ecx, ebx
call fcn.00012558
push 0xa
push edi
jmp 0x13155
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [esp + 0x44], eax
jmp 0x129cd
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.000125dd
mov eax, dword [esp + 0x40]
push eax
push dword [esp + 0x18]
mov eax, dword [esp + 0x28]
add eax, 0xffff
and eax, 0xffff0000
push eax
push dword [esp + 0x58]
push dword [esp + 0x58]
push esi
push dword [esp + 0x5c]
call edi
add esp, 0x1c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffff
push 0x11498
jmp 0x12b82
push 0xffffffffffffffff
push 0x11488
jmp 0x12b82
push 0xffffffffffffffff
push 0x11478
jmp 0x12b82
push 0xffffffffffffffff
push 0x11468
jmp 0x12b82
push 0xffffffffffffffff
push 0x11454
jmp 0x13137
push 0xffffffffffffffff
mov ebx, 0x16044
push 0x11440
mov ecx, ebx
call fcn.00012558
push 0xa
push dword [esp + 0x4c]
mov ecx, ebx
call fcn.000124da
push 0xffffffffffffffff
push 0x113b0
mov ecx, ebx
call fcn.00012558
push 0xa
push esi
jmp 0x13155
push 0xffffffffffffffff
push 0x1142c
jmp 0x13137
push 0xffffffffffffffff
push 0x11418
jmp 0x13137
push 0xffffffffffffffff
push 0x11404
jmp 0x13137
push 0xffffffffffffffff
push 0x113b8
jmp 0x13137
mov ebx, 0x16044
push 0x1153c
push 0x11548
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
push 0x11560
mov ecx, ebx
mov edx, eax
call fcn.00012330
push eax
push 0
call edx
call fcn.000125dd
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]