Function at 0x1294b
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.00012365
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 0x129b1
push 3
pop edi
mov ebx, 0x16044
call fcn.000136e3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x16040]
mov eax, ecx
div edi
cmp ecx, 0x8000
jb 0x12a06
test edx, edx
jne 0x12edc
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 0x13299
push 0xffffffffffffffff
push 0x11528
jmp 0x13147
mov ecx, ebx
call fcn.00012607
push ecx
call fcn.000125c8
lea ecx, [esp + 0x58]
call fcn.00012607
call fcn.000136e3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x16040]
mov eax, ecx
div edi
cmp ecx, 0x8000
jae 0x129d1
call fcn.0001368a
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 0x12a91
push 0x11180
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [0x16008]
pop ecx
pop ecx
test eax, eax
je 0x12a91
mov ecx, esi
mov byte [esp + 0x13], 1
call fcn.000133bb
test al, al
je 0x1337d
xor ecx, ecx
jmp 0x12ab0
xor ecx, ecx
cmp dword [esi], 0x696d7678
mov byte [esp + 0x13], cl
jne 0x12d3d
cmp dword [esi + 4], 0x74636a6e
jne 0x12d3d
test esi, esi
je 0x12d3d
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 0x1314e
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 0x13140
mov ecx, dword [ebx + 0x48]
cmp ecx, 0x3fc
jae 0x13123
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 0x11
pop ecx
cmp dword [edi], ecx
cmovb ecx, dword [edi]
mov ecx, dword [ecx*4 + 0x115f0]
add ecx, edi
cmp eax, ecx
ja 0x12b5b
mov eax, dword [edi + 0x43c4]
lea ecx, [esp + 0x58]
push dword [edi + 0x43c0]
add eax, edi
push eax
call fcn.00012568
mov eax, dword [edi + 0x40]
xor esi, esi
xor ebx, ebx
mov dword [esp + 0x24], esi
test eax, eax
je 0x12ba3
cmp dword [edi + 0x44], ebx
je 0x12ba3
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 0x12bad
push 0xffffffffffffffff
push 0x1134c
mov ebx, 0x16044
mov ecx, ebx
call fcn.00012568
jmp 0x1337d
cmp byte [esp + 0x13], bl
jne 0x13117
mov eax, dword [edi + 0x50]
test eax, eax
je 0x12be3
cmp dword [edi + 0x54], esi
je 0x12be3
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 0x12bee
push 0xffffffffffffffff
push 0x11374
jmp 0x12b92
cmp byte [esp + 0x1b], 0
jne 0x1310b
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov edi, dword [eax + 0x10]
test ebx, ebx
je 0x12c30
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 0x12cc0
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 0x12cbc
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 0x12cb9
push dword [esp + 0x68]
push esi
call dword [0x1600c]
pop ecx
pop ecx
jmp 0x12cbc
mov byte [esi], 0
mov esi, dword [esp + 0x24]
call fcn.000136c6
test al, al
je 0x12d66
call fcn.0001368a
xor edx, edx
mov ecx, dword [eax + 0x20]
cmp dword [eax + 0x24], edx
ja 0x12d66
jb 0x12cea
cmp ecx, 0x7fff0000
jae 0x12d66
test ebx, ebx
je 0x12d12
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 0x12d16
mov ebx, dword [esp + 0x14]
push 3
pop edi
test esi, esi
je 0x12d69
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 0x12d69
mov esi, 0x3fc
lea eax, [esp + 0xb8]
push esi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x12d5a
cmp eax, esi
jne 0x12d6e
push 0xffffffffffffffff
push 0x1139c
jmp 0x13155
push 3
pop edi
mov ebx, 0x16044
push 0x5c
pop eax
cmp word [esp + 0xb8], ax
jne 0x12d8e
cmp word [esp + 0xba], ax
jne 0x12d8e
lea esi, [esp + 0xb8]
jmp 0x12dad
push 8
lea eax, [esp + 0xb4]
push 0x115e0
push eax
call dword [0x1601c]
add esp, 0xc
lea esi, [esp + 0xb0]
call fcn.000136e3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x16040]
mov eax, ecx
div edi
cmp ecx, 0x8000
jae 0x129d1
push 0xffffffffffffffff
push esi
mov ecx, ebx
call fcn.00012568
push 0xffffffffffffffff
push 0x113b0
mov ecx, ebx
call fcn.00012568
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 0x1336c
call fcn.00013704
test eax, eax
jne 0x129b1
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 0x13360
push 0x1000
push 0
push 0
push 4
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, eax
test ecx, ecx
je 0x13354
call fcn.00012648
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 0x13348
xor eax, eax
mov ecx, esi
push eax
add ecx, 0x1000
pop edx
adc eax, edx
cmp dword [esp + 0x4c], eax
jl 0x13312
jg 0x12e91
cmp dword [esp + 0x48], ecx
jbe 0x13312
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 0x13306
call fcn.000136e3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x16040]
push 3
mov eax, ecx
pop edi
div edi
cmp ecx, 0x8000
jb 0x12eea
test edx, edx
je 0x129d9
mov ebx, 0x16044
cmp edx, 1
je 0x129b6
jmp 0x13050
mov ecx, ebx
call fcn.00012648
push 4
lea esi, [ebx + eax]
mov ecx, dword [esi]
pop ebx
add esi, ebx
cmp ecx, 0x6d7678
jne 0x132fa
mov ecx, dword [esi]
add esi, ebx
cmp ecx, edi
jne 0x132ee
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 0x132e2
mov ecx, dword [esi]
add esi, ebx
imul edx, edi, 0x8088405
inc edx
mov eax, edx
xor eax, edi
cmp eax, ecx
jne 0x132d6
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 0x13205
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 0x131f9
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 0x131ed
lea eax, [ebx + ecx]
mov dword [esp + 0x3c], eax
mov ecx, eax
test esi, esi
je 0x13019
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 0x13000
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.00013a40
mov esi, eax
pop ecx
test esi, esi
jne 0x131dc
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.000136e3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x16040]
mov eax, ecx
div dword [esp + 0x54]
cmp ecx, 0x8000
jb 0x13099
test edx, edx
je 0x129d9
cmp edx, 1
jne 0x13058
jmp 0x129ae
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.00013b50
mov esi, eax
cmp esi, 1
jne 0x131d3
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.000136e3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x16040]
push 3
mov eax, ecx
pop esi
div esi
cmp ecx, 0x8000
jb 0x13171
test edx, edx
je 0x129d9
mov esi, dword [esp + 0x30]
jmp 0x1308f
push 0xffffffffffffffff
push 0x11388
jmp 0x12b92
push 0xffffffffffffffff
push 0x11360
jmp 0x12b92
push 0xffffffffffffffff
push 0x11338
mov ecx, 0x16044
call fcn.00012568
push 0xa
push dword [ebx + 0x48]
mov ebx, 0x16044
jmp 0x13165
push 0xffffffffffffffff
push 0x11324
mov ebx, 0x16044
jmp 0x13155
push 0xffffffffffffffff
push 0x11310
mov ecx, ebx
call fcn.00012568
push 0xa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, ebx
call fcn.000124ea
jmp 0x1337d
mov ecx, edi
call fcn.00012707
mov esi, eax
test esi, esi
je 0x13378
push 0x8000
push dword [esp + 0x34]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
lea ecx, [esp + 0x6c]
call fcn.00012607
push 0x10
push esi
lea ecx, [esp + 0x74]
call fcn.000124ea
push dword [esp + 0x6c]
push 0x11504
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ecx, esi
call fcn.0001267e
mov edi, eax
test edi, edi
jne 0x13288
push 0xffffffffffffffff
push 0x11518
jmp 0x12b92
push 0xffffffffffffffff
push 0x114dc
jmp 0x131e3
push 0xffffffffffffffff
push 0x114d0
mov ebx, 0x16044
jmp 0x13339
push 0xffffffffffffffff
push 0x114bc
jmp 0x13147
push 0xffffffffffffffff
push 0x114a8
jmp 0x13147
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 0x13192
push 0xffffffffffffffff
mov ebx, 0x16044
push 0x114e8
mov ecx, ebx
call fcn.00012568
push 0xffffffffffffffff
lea ecx, [esp + 0x5c]
call fcn.00012340
push eax
mov ecx, ebx
call fcn.00012568
push 0xffffffffffffffff
push 0x114fc
mov ecx, ebx
call fcn.00012568
push 0xa
push edi
jmp 0x13165
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [esp + 0x44], eax
jmp 0x129dd
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.000125ed
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 0x12b92
push 0xffffffffffffffff
push 0x11488
jmp 0x12b92
push 0xffffffffffffffff
push 0x11478
jmp 0x12b92
push 0xffffffffffffffff
push 0x11468
jmp 0x12b92
push 0xffffffffffffffff
push 0x11454
jmp 0x13147
push 0xffffffffffffffff
mov ebx, 0x16044
push 0x11440
mov ecx, ebx
call fcn.00012568
push 0xa
push dword [esp + 0x4c]
mov ecx, ebx
call fcn.000124ea
push 0xffffffffffffffff
push 0x113b0
mov ecx, ebx
call fcn.00012568
push 0xa
push esi
jmp 0x13165
push 0xffffffffffffffff
push 0x1142c
jmp 0x13147
push 0xffffffffffffffff
push 0x11418
jmp 0x13147
push 0xffffffffffffffff
push 0x11404
jmp 0x13147
push 0xffffffffffffffff
push 0x113b8
jmp 0x13147
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.00012340
push eax
push 0
call edx
call fcn.000125ed
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]