Function at 0x403960
Capabilities:
Generate random numbers using the delphi lcg
Move file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
mov dword [ebp - 4], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x14], 0
push dword [ebp + 8]
call fcn.004034cc
test eax, eax
jne 0x4039a1
push 0
push dword [ebp + 8]
push 2
push dword [0x40770c]
call fcn.00402230
jmp 0x403baa
mov edi, dword [ebp + 0x14]
cmp dword [edi], 0
je 0x403a07
mov ecx, dword [edi]
cmp dword [ecx + 0x25c], eax
je 0x4039c2
push dword [edi]
call fcn.00401fe4
mov dword [edi], 0
jmp 0x403a07
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 8]
call fcn.00403584
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4039dc
jmp 0x403baa
mov ebx, dword [ebp - 0x10]
mov ecx, dword [edi]
push pe_nt_image_headers32
lea eax, [ecx + 0x260]
push eax
lea eax, [ebx + 0x260]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
push dword [edi]
call fcn.00401fe4
mov dword [edi], ebx
jmp 0x403a82
lea eax, [edi]
push eax
push dword [ebp + 8]
call fcn.00403584
mov dword [ebp - 0xc], eax
cmp dword [edi], 0
jne 0x403a1f
jmp 0x403baa
mov ebx, dword [edi]
mov esi, dword [0x407704]
lea ebx, [ebx + 0x260]
lea eax, [esi + 0x80]
push eax
lea eax, [esi]
push eax
push ebx
call fcn.004015c4
mov edx, dword [ebx + 0x7c]
mov eax, 0x78
imul edx, edx, 0x8088405
inc edx
mul edx
mov ecx, dword [esi + 0x80]
cmp dword [ebx + edx], ecx
je 0x403a82
cmp dword [edi], 0
je 0x403a6b
push dword [edi]
call fcn.00401fe4
mov dword [edi], 0
push 0
push dword [ebp + 8]
push 3
push dword [0x40770c]
call fcn.00402230
jmp 0x403baa
push dword [edi]
push dword [ebp + 8]
call fcn.0040378c
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x403a9a
jmp 0x403baa
push 8
push dword [ebp - 0x14]
push dword [ebp + 8]
call sub.KERNEL32.dll_MoveFileExW
test eax, eax
jne 0x403ad7
cmp dword fs:[0x34], 0xb7
jne 0x403ad2
push dword [ebp - 0x14]
call fcn.0040369c
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x403ace
jmp 0x403baa
jmp 0x403a9a
jmp 0x403baa
push 0
push 0x48000000
push 3
push 0
push 0
push 0xc0000000
push dword [ebp - 0x14]
call sub.KERNEL32.dll_CreateFileW
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x403aff
jmp 0x403baa
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [edi]
push dword [ebp + 8]
call fcn.00403890
mov ebx, eax
test ebx, ebx
jne 0x403b22
push dword [ebp - 8]
call sub.ntdll.dll_NtClose
jmp 0x403baa
push 0
push 0
push dword [0x407f14]
push dword [ebp - 8]
call sub.KERNEL32.dll_CreateIoCompletionPort
test eax, eax
jne 0x403b48
push ebx
call fcn.00401fe4
push dword [ebp - 8]
call sub.ntdll.dll_NtClose
jmp 0x403baa
push dword [ebp - 0xc]
pop dword [ebx + 0x3c]
push dword [ebp - 8]
pop dword [ebx + 0x2c]
mov dword [ebx + 0x30], 0
lea eax, [ebx]
push eax
push 0
push 0
push dword [0x407f14]
call sub.KERNEL32.dll_PostQueuedCompletionStatus
test eax, eax
jne 0x403b86
push dword [ebx + 0x240]
call sub.ntdll.dll_RtlDestroyHeap
push dword [ebp - 8]
call sub.ntdll.dll_NtClose
jmp 0x403baa
push dword [ebp - 0x14]
push dword [ebp + 8]
push 0
push dword [0x40770c]
call fcn.00402230
push 0x407f18
call sub.KERNEL32.dll_InterlockedIncrement
mov dword [ebp - 4], 1
cmp dword [ebp - 0x14], 0
je 0x403bb8
push dword [ebp - 0x14]
call fcn.00401fe4
cmp dword [ebp + 8], 0
je 0x403bc6
push dword [ebp + 8]
call fcn.00401fe4
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10