Function at 0x402045
Capabilities:
Delete file
Move file

Disassembly:
mov eax, 0x411b7b
call fcn.00410b94
sub esp, 0xd4
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x10], esp
xor edi, edi
push edi
push 3
push 7
push 0x40000000
mov eax, ebx
lea esi, [ebp - 0x14]
mov dword [ebp - 4], edi
call fcn.004034eb
push 0x55
lea esi, [ebp - 0x2c]
mov byte [ebp - 4], 1
call fcn.00402919
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 2
call fcn.004034ae
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x1c]
or eax, dword [ebp - 0x18]
je 0x4020d5
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x2c]
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x50], eax
cmp edi, dword [ebp - 0x18]
ja 0x4020bc
jb 0x4020b7
cmp eax, dword [ebp - 0x1c]
jae 0x4020bc
lea eax, [ebp - 0x50]
jmp 0x4020bf
lea eax, [ebp - 0x1c]
mov esi, dword [eax]
push esi
push dword [ebp - 0x2c]
lea eax, [ebp - 0x14]
call fcn.0040346b
sub dword [ebp - 0x1c], esi
sbb dword [ebp - 0x18], edi
jmp 0x402097
cmp dword [ebp - 0x2c], edi
je 0x4020e3
push dword [ebp - 0x2c]
call fcn.0040aee7
pop ecx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], edi
cmp dword [ebp - 0x14], edi
je 0x402100
cmp dword [ebp - 0x14], 0xffffffff
je 0x402100
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 4], 0xffffffff
jmp 0x402115
xor eax, eax
push 0x4159e8
lea esi, [ebp - 0x6c]
mov dword [ebp - 0x58], 7
mov dword [ebp - 0x5c], edi
mov word [ebp - 0x6c], ax
call fcn.004033b5
push 0x20
mov eax, esi
push eax
lea eax, [ebp - 0xdc]
push eax
push dword [ebp + 8]
mov dword [ebp - 4], 4
call fcn.00402963
mov esi, eax
lea eax, [ebp - 0xa4]
push eax
mov eax, ebx
mov byte [ebp - 4], 5
call fcn.0040696c
lea ecx, [ebp - 0xc0]
push 0x5c
push ecx
mov byte [ebp - 4], 6
call fcn.00402942
mov ecx, eax
mov eax, esi
lea edi, [ebp - 0x88]
mov byte [ebp - 4], 7
call fcn.004029f0
push str..tmp
push eax
lea eax, [ebp - 0x48]
mov byte [ebp - 4], 8
call fcn.00402a37
add esp, 0x14
push 1
xor edi, edi
lea esi, [ebp - 0x88]
call fcn.00403304
push 1
lea esi, [ebp - 0xc0]
call fcn.00403304
push 1
lea esi, [ebp - 0xa4]
call fcn.00403304
push 1
lea esi, [ebp - 0xdc]
call fcn.00403304
push 1
lea esi, [ebp - 0x6c]
mov byte [ebp - 4], 0xe
call fcn.00403304
mov ecx, dword [ebp - 0x48]
push 8
pop edi
cmp dword [ebp - 0x34], edi
jae 0x4021ed
lea ecx, [ebp - 0x48]
cmp dword [ebx + 0x14], edi
jb 0x4021f6
mov eax, dword [ebx]
jmp 0x4021f8
mov eax, ebx
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileExW]
push edi
push ecx
push eax
call esi
test eax, eax
jne 0x402213
push 0xffffffffffffffff
push eax
push ebx
lea eax, [ebp - 0x48]
call fcn.00403120
mov eax, dword [ebp - 0x48]
cmp dword [ebp - 0x34], edi
jae 0x40221e
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x402258
mov eax, dword [ebx + 0x10]
cmp dword [ebx + 0x14], edi
jb 0x402233
mov ebx, dword [ebx]
mov edi, eax
mov eax, dword [ebp - 0x38]
push ebx
lea ecx, [ebp - 0x48]
call fcn.00402d60
test eax, eax
je 0x402258
cmp dword [ebp - 0x34], 8
mov eax, dword [ebp - 0x48]
jae 0x402251
lea eax, [ebp - 0x48]
push 4
push 0
push eax
call esi
push 1
xor edi, edi
lea esi, [ebp - 0x48]
call fcn.00403304
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 8