Function at 0x40294b
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.00402365
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 0x4029b1
push 3
pop edi
mov ebx, 0x406044
call fcn.004036e3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x406040]
mov eax, ecx
div edi
cmp ecx, 0x8000
jb 0x402a06
test edx, edx
jne 0x402edc
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 0x403299
push 0xffffffffffffffff
push 0x401528
jmp 0x403147
mov ecx, ebx
call fcn.00402607
push ecx
call fcn.004025c8
lea ecx, [esp + 0x58]
call fcn.00402607
call fcn.004036e3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x406040]
mov eax, ecx
div edi
cmp ecx, 0x8000
jae 0x4029d1
call fcn.0040368a
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 0x402a91
push 0x401180
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [0x406008]
pop ecx
pop ecx
test eax, eax
je 0x402a91
mov ecx, esi
mov byte [esp + 0x13], 1
call fcn.004033bb
test al, al
je 0x40337d
xor ecx, ecx
jmp 0x402ab0
xor ecx, ecx
cmp dword [esi], 0x696d7678
mov byte [esp + 0x13], cl
jne 0x402d3d
cmp dword [esi + 4], 0x74636a6e
jne 0x402d3d
test esi, esi
je 0x402d3d
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 0x40314e
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 0x403140
mov ecx, dword [ebx + 0x48]
cmp ecx, 0x3fc
jae 0x403123
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 0x11
pop ecx
cmp dword [edi], ecx
cmovb ecx, dword [edi]
mov ecx, dword [ecx*4 + 0x4015f0]
add ecx, edi
cmp eax, ecx
ja 0x402b5b
mov eax, dword [edi + 0x43c4]
lea ecx, [esp + 0x58]
push dword [edi + 0x43c0]
add eax, edi
push eax
call fcn.00402568
mov eax, dword [edi + 0x40]
xor esi, esi
xor ebx, ebx
mov dword [esp + 0x24], esi
test eax, eax
je 0x402ba3
cmp dword [edi + 0x44], ebx
je 0x402ba3
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 0x402bad
push 0xffffffffffffffff
push 0x40134c
mov ebx, 0x406044
mov ecx, ebx
call fcn.00402568
jmp 0x40337d
cmp byte [esp + 0x13], bl
jne 0x403117
mov eax, dword [edi + 0x50]
test eax, eax
je 0x402be3
cmp dword [edi + 0x54], esi
je 0x402be3
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 0x402bee
push 0xffffffffffffffff
push 0x401374
jmp 0x402b92
cmp byte [esp + 0x1b], 0
jne 0x40310b
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov edi, dword [eax + 0x10]
test ebx, ebx
je 0x402c30
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 0x402cc0
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 0x402cbc
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 0x402cb9
push dword [esp + 0x68]
push esi
call dword [0x40600c]
pop ecx
pop ecx
jmp 0x402cbc
mov byte [esi], 0
mov esi, dword [esp + 0x24]
call fcn.004036c6
test al, al
je 0x402d66
call fcn.0040368a
xor edx, edx
mov ecx, dword [eax + 0x20]
cmp dword [eax + 0x24], edx
ja 0x402d66
jb 0x402cea
cmp ecx, 0x7fff0000
jae 0x402d66
test ebx, ebx
je 0x402d12
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 0x402d16
mov ebx, dword [esp + 0x14]
push 3
pop edi
test esi, esi
je 0x402d69
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 0x402d69
mov esi, 0x3fc
lea eax, [esp + 0xb8]
push esi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x402d5a
cmp eax, esi
jne 0x402d6e
push 0xffffffffffffffff
push 0x40139c
jmp 0x403155
push 3
pop edi
mov ebx, 0x406044
push 0x5c
pop eax
cmp word [esp + 0xb8], ax
jne 0x402d8e
cmp word [esp + 0xba], ax
jne 0x402d8e
lea esi, [esp + 0xb8]
jmp 0x402dad
push 8
lea eax, [esp + 0xb4]
push 0x4015e0
push eax
call dword [0x40601c]
add esp, 0xc
lea esi, [esp + 0xb0]
call fcn.004036e3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x406040]
mov eax, ecx
div edi
cmp ecx, 0x8000
jae 0x4029d1
push 0xffffffffffffffff
push esi
mov ecx, ebx
call fcn.00402568
push 0xffffffffffffffff
push 0x4013b0
mov ecx, ebx
call fcn.00402568
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 0x40336c
call fcn.00403704
test eax, eax
jne 0x4029b1
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 0x403360
push 0x1000
push 0
push 0
push 4
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, eax
test ecx, ecx
je 0x403354
call fcn.00402648
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 0x403348
xor eax, eax
mov ecx, esi
push eax
add ecx, 0x1000
pop edx
adc eax, edx
cmp dword [esp + 0x4c], eax
jl 0x403312
jg 0x402e91
cmp dword [esp + 0x48], ecx
jbe 0x403312
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 0x403306
call fcn.004036e3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x406040]
push 3
mov eax, ecx
pop edi
div edi
cmp ecx, 0x8000
jb 0x402eea
test edx, edx
je 0x4029d9
mov ebx, 0x406044
cmp edx, 1
je 0x4029b6
jmp 0x403050
mov ecx, ebx
call fcn.00402648
push 4
lea esi, [ebx + eax]
mov ecx, dword [esi]
pop ebx
add esi, ebx
cmp ecx, 0x6d7678
jne 0x4032fa
mov ecx, dword [esi]
add esi, ebx
cmp ecx, edi
jne 0x4032ee
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 0x4032e2
mov ecx, dword [esi]
add esi, ebx
imul edx, edi, 0x8088405
inc edx
mov eax, edx
xor eax, edi
cmp eax, ecx
jne 0x4032d6
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 0x403205
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 0x4031f9
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 0x4031ed
lea eax, [ebx + ecx]
mov dword [esp + 0x3c], eax
mov ecx, eax
test esi, esi
je 0x403019
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 0x403000
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.00403a40
mov esi, eax
pop ecx
test esi, esi
jne 0x4031dc
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.004036e3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x406040]
mov eax, ecx
div dword [esp + 0x54]
cmp ecx, 0x8000
jb 0x403099
test edx, edx
je 0x4029d9
cmp edx, 1
jne 0x403058
jmp 0x4029ae
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.00403b50
mov esi, eax
cmp esi, 1
jne 0x4031d3
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.004036e3
mov ecx, eax
xor edx, edx
sub ecx, dword [0x406040]
push 3
mov eax, ecx
pop esi
div esi
cmp ecx, 0x8000
jb 0x403171
test edx, edx
je 0x4029d9
mov esi, dword [esp + 0x30]
jmp 0x40308f
push 0xffffffffffffffff
push 0x401388
jmp 0x402b92
push 0xffffffffffffffff
push 0x401360
jmp 0x402b92
push 0xffffffffffffffff
push 0x401338
mov ecx, 0x406044
call fcn.00402568
push 0xa
push dword [ebx + 0x48]
mov ebx, 0x406044
jmp 0x403165
push 0xffffffffffffffff
push 0x401324
mov ebx, 0x406044
jmp 0x403155
push 0xffffffffffffffff
push 0x401310
mov ecx, ebx
call fcn.00402568
push 0xa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, ebx
call fcn.004024ea
jmp 0x40337d
mov ecx, edi
call fcn.00402707
mov esi, eax
test esi, esi
je 0x403378
push 0x8000
push dword [esp + 0x34]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
lea ecx, [esp + 0x6c]
call fcn.00402607
push 0x10
push esi
lea ecx, [esp + 0x74]
call fcn.004024ea
push dword [esp + 0x6c]
push 0x401504
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov ecx, esi
call fcn.0040267e
mov edi, eax
test edi, edi
jne 0x403288
push 0xffffffffffffffff
push 0x401518
jmp 0x402b92
push 0xffffffffffffffff
push 0x4014dc
jmp 0x4031e3
push 0xffffffffffffffff
push 0x4014d0
mov ebx, 0x406044
jmp 0x403339
push 0xffffffffffffffff
push 0x4014bc
jmp 0x403147
push 0xffffffffffffffff
push 0x4014a8
jmp 0x403147
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 0x403192
push 0xffffffffffffffff
mov ebx, 0x406044
push 0x4014e8
mov ecx, ebx
call fcn.00402568
push 0xffffffffffffffff
lea ecx, [esp + 0x5c]
call fcn.00402340
push eax
mov ecx, ebx
call fcn.00402568
push 0xffffffffffffffff
push 0x4014fc
mov ecx, ebx
call fcn.00402568
push 0xa
push edi
jmp 0x403165
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [esp + 0x44], eax
jmp 0x4029dd
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.004025ed
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 0x402b92
push 0xffffffffffffffff
push 0x401488
jmp 0x402b92
push 0xffffffffffffffff
push 0x401478
jmp 0x402b92
push 0xffffffffffffffff
push 0x401468
jmp 0x402b92
push 0xffffffffffffffff
push 0x401454
jmp 0x403147
push 0xffffffffffffffff
mov ebx, 0x406044
push 0x401440
mov ecx, ebx
call fcn.00402568
push 0xa
push dword [esp + 0x4c]
mov ecx, ebx
call fcn.004024ea
push 0xffffffffffffffff
push 0x4013b0
mov ecx, ebx
call fcn.00402568
push 0xa
push esi
jmp 0x403165
push 0xffffffffffffffff
push 0x40142c
jmp 0x403147
push 0xffffffffffffffff
push 0x401418
jmp 0x403147
push 0xffffffffffffffff
push 0x401404
jmp 0x403147
push 0xffffffffffffffff
push 0x4013b8
jmp 0x403147
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.00402340
push eax
push 0
call edx
call fcn.004025ed
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]