Function at 0x40e2f0
Capabilities:
Move file

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41f5a0
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x298
mov eax, dword [0x42700c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x104
lea eax, [ebp - 0x170]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
xorps xmm0, xmm0
mov dword [ebp - 0x178], 0
lea ecx, [ebp - 0x170]
mov dword [ebp - 0x174], 0
movups xmmword [ebp - 0x188], xmm0
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40e370
sub ecx, edx
lea eax, [ebp - 0x170]
push ecx
push eax
lea ecx, [ebp - 0x188]
call fcn.004035e0
mov dword [ebp - 4], 0
lea esi, [ebp - 0x188]
cmp dword [ebp - 0x174], 0x10
mov edi, dword [ebp - 0x178]
cmovae esi, dword [ebp - 0x188]
test edi, edi
je 0x40e417
push 0x5c
lea eax, [ebp - 0x2a0]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x243]
push 0xa3
push 0
push eax
call sub.VCRUNTIME140.dll_memset
or eax, 0xffffffff
mov byte [ebp - 0x244], 1
lea ecx, [edi - 1]
add esp, 0xc
cmp ecx, eax
cmovb eax, ecx
movzx ecx, byte [eax + esi]
add eax, esi
cmp byte [ebp + ecx - 0x2a0], 0
jne 0x40e413
nop dword [eax]
cmp eax, esi
je 0x40e417
movzx ecx, byte [eax - 1]
dec eax
cmp byte [ebp + ecx - 0x2a0], 0
je 0x40e400
sub eax, esi
jmp 0x40e41a
or eax, 0xffffffff
lea ecx, [eax + 1]
mov dword [ebp - 0x190], 0
mov dword [ebp - 0x18c], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x1a0], xmm0
cmp edi, ecx
jb 0x40e5bf
mov eax, edi
sub eax, ecx
cmp eax, edi
cmovb edi, eax
cmp dword [ebp - 0x174], 0x10
lea eax, [ebp - 0x188]
cmovae eax, dword [ebp - 0x188]
add eax, ecx
lea ecx, [ebp - 0x1a0]
push edi
push eax
call fcn.004035e0
push 0
call dword [sym.imp.api_ms_win_crt_time_l1_1_0.dll__time64]
add esp, 4
push eax
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
mov ecx, 0xf
lea edi, [ebp - 0x68]
mov esi, str.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
add esp, 4
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
cdq
mov ecx, 6
idiv ecx
xor esi, esi
lea edi, [edx + 6]
test edi, edi
jle 0x40e4cb
nop dword [eax]
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
cdq
mov ecx, 0x24
idiv ecx
mov al, byte [ebp + edx - 0x68]
mov byte [ebp + esi - 0x28], al
inc esi
cmp esi, edi
jl 0x40e4b0
cmp edi, 0x14
jae 0x40e5ba
push str..exe
lea eax, [ebp - 0x28]
mov byte [ebp + edi - 0x28], 0
push 0x14
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcat_s]
add esp, 0xc
lea ecx, [ebp - 0x28]
cmp dword [ebp - 0x18c], 0x10
lea eax, [ebp - 0x1a0]
cmovae eax, dword [ebp - 0x1a0]
push ecx
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_rename]
mov ecx, dword [ebp - 0x18c]
add esp, 8
cmp ecx, 0x10
jb 0x40e545
mov edx, dword [ebp - 0x1a0]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40e53b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e58c
push ecx
push edx
call fcn.0041de77
add esp, 8
mov ecx, dword [ebp - 0x174]
mov dword [ebp - 0x190], 0
mov dword [ebp - 0x18c], 0xf
mov byte [ebp - 0x1a0], 0
cmp ecx, 0x10
jb 0x40e59c
mov edx, dword [ebp - 0x188]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40e592
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40e592
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.0041de77
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0041dbde
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.0041e1bb
call fcn.004035d0
int3