Function at 0x403970
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.004034dc
test eax, eax
jne 0x4039b1
push 0
push dword [ebp + 8]
push 2
push dword [0x40770c]
call fcn.00402240
jmp 0x403bba
mov edi, dword [ebp + 0x14]
cmp dword [edi], 0
je 0x403a17
mov ecx, dword [edi]
cmp dword [ecx + 0x25c], eax
je 0x4039d2
push dword [edi]
call fcn.00401ff4
mov dword [edi], 0
jmp 0x403a17
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 8]
call fcn.00403594
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4039ec
jmp 0x403bba
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.00401ff4
mov dword [edi], ebx
jmp 0x403a92
lea eax, [edi]
push eax
push dword [ebp + 8]
call fcn.00403594
mov dword [ebp - 0xc], eax
cmp dword [edi], 0
jne 0x403a2f
jmp 0x403bba
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.004015d4
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 0x403a92
cmp dword [edi], 0
je 0x403a7b
push dword [edi]
call fcn.00401ff4
mov dword [edi], 0
push 0
push dword [ebp + 8]
push 3
push dword [0x40770c]
call fcn.00402240
jmp 0x403bba
push dword [edi]
push dword [ebp + 8]
call fcn.0040379c
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x403aaa
jmp 0x403bba
push 8
push dword [ebp - 0x14]
push dword [ebp + 8]
call sub.KERNEL32.dll_MoveFileExW
test eax, eax
jne 0x403ae7
cmp dword fs:[0x34], 0xb7
jne 0x403ae2
push dword [ebp - 0x14]
call fcn.004036ac
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x403ade
jmp 0x403bba
jmp 0x403aaa
jmp 0x403bba
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 0x403b0f
jmp 0x403bba
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [edi]
push dword [ebp + 8]
call fcn.004038a0
mov ebx, eax
test ebx, ebx
jne 0x403b32
push dword [ebp - 8]
call sub.ntdll.dll_NtClose
jmp 0x403bba
push 0
push 0
push dword [0x407f14]
push dword [ebp - 8]
call sub.KERNEL32.dll_CreateIoCompletionPort
test eax, eax
jne 0x403b58
push ebx
call fcn.00401ff4
push dword [ebp - 8]
call sub.ntdll.dll_NtClose
jmp 0x403bba
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 0x403b96
push dword [ebx + 0x240]
call sub.ntdll.dll_RtlDestroyHeap
push dword [ebp - 8]
call sub.ntdll.dll_NtClose
jmp 0x403bba
push dword [ebp - 0x14]
push dword [ebp + 8]
push 0
push dword [0x40770c]
call fcn.00402240
push 0x407f18
call sub.KERNEL32.dll_InterlockedIncrement
mov dword [ebp - 4], 1
cmp dword [ebp - 0x14], 0
je 0x403bc8
push dword [ebp - 0x14]
call fcn.00401ff4
cmp dword [ebp + 8], 0
je 0x403bd6
push dword [ebp + 8]
call fcn.00401ff4
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10