Function at 0x417f60
Capabilities:
Delete file
Get common file path

Disassembly:
sub esp, 0x424
mov eax, dword [0x4630b0]
xor eax, esp
mov dword [esp + 0x420], eax
push ebx
or eax, 0xffffffff
push esi
push edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], eax
lea eax, [esp + 0x224]
push eax
push 0x104
mov dword [esp + 0x14], 0
mov byte [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ecx, [esp + 0x120]
push ecx
push 0
push 0x453c40
lea edx, [esp + 0x230]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x124]
push ecx
call fcn.004153d0
add esp, 8
test eax, eax
je 0x417ff6
push 0xab
call fcn.0040ae20
mov ebx, dword [esp + 0x18]
add esp, 4
mov dword [esp + 0xc], 1
jmp 0x41831c
mov esi, 1
cmp dword [esp + 0x14], esi
jge 0x41801b
push 0xac
call fcn.0040ae20
mov ebx, dword [esp + 0x18]
add esp, 4
mov dword [esp + 0xc], esi
jmp 0x41831c
push 0x4000
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebx, eax
test ebx, ebx
jne 0x41804f
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x420]
xor ecx, esp
call fcn.0043b3fc
add esp, 0x424
ret
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
jmp 0x418060
cmp dword [0x46503c], 0
mov eax, 0x453c30
jne 0x418073
mov eax, 0x453c20
push 0
push eax
mov eax, dword [0x465298]
push 0x460010
push 0
lea edx, [esp + 0x30]
push edx
push str.Repackaged_EXE_File_Name
push esi
push eax
call fcn.004073e0
add esp, 0x20
test eax, eax
jne 0x418194
lea ecx, [esp + 0x20]
push 0x2e
push ecx
call fcn.0043b5f0
add esp, 8
test eax, eax
je 0x4180d5
cmp dword [0x46503c], 0
mov ecx, 0x453c00
jne 0x4180c4
mov ecx, 0x453bfc
push ecx
add eax, 1
push eax
call fcn.0044f18a
add esp, 8
test eax, eax
je 0x418121
cmp dword [0x46503c], 0
mov eax, 0x453bf4
jne 0x4180e8
mov eax, 0x453bec
mov edx, eax
lea ebx, [ebx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4180f0
lea edi, [esp + 0x20]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x418102
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, 1
push 0x104
lea edx, [esp + 0x330]
push edx
push 0
call ebp
test eax, eax
je 0x418161
lea eax, [esp + 0x32c]
push eax
lea ecx, [esp + 0x24]
push ecx
call fcn.0044f18a
add esp, 8
test eax, eax
jne 0x418161
push 0xad
call fcn.0040ae20
add esp, 4
jmp 0x418060
lea edx, [esp + 0x20]
push edx
call fcn.0040a6d0
add esp, 4
test eax, eax
je 0x41819d
push 3
push str.This_file_already_exists._OK_to_overwrite_it_
call fcn.00406520
add esp, 8
cmp eax, 7
je 0x418060
cmp eax, 6
je 0x41819d
mov byte [esp + 0x20], 0
mov dword [esp + 0x10], esi
jmp 0x41831b
lea eax, [esp + 0x20]
push 0x1000
push eax
call fcn.0040a5e0
add esp, 8
test eax, eax
mov dword [esp + 0x14], eax
jge 0x4181c4
mov dword [esp + 0x10], 2
jmp 0x41831b
mov edi, dword [0x465034]
test edi, edi
mov ebp, 2
jg 0x4181e7
mov ecx, dword [0x460004]
push ebp
push 0
push ecx
call fcn.0040a650
add esp, 0xc
mov edi, eax
mov edx, dword [0x460004]
push 0
push 0
push edx
call fcn.0040a650
add esp, 0xc
test eax, eax
je 0x418207
mov dword [esp + 0x10], ebp
jmp 0x41831b
test edi, edi
je 0x41824a
jmp 0x418210
cmp edi, 0x4000
mov esi, edi
jl 0x41821f
mov esi, 0x4000
mov eax, dword [0x460004]
push esi
push ebx
push eax
call fcn.0040a670
add esp, 0xc
cmp eax, esi
jne 0x418266
mov ecx, dword [esp + 0x14]
push esi
push ebx
push ecx
call fcn.0040a6a0
add esp, 0xc
cmp eax, esi
jne 0x418266
sub edi, esi
jne 0x418210
lea edx, [esp + 0x124]
push 0
push edx
call fcn.0040a5e0
mov edi, eax
add esp, 8
test edi, edi
mov dword [esp + 0x1c], edi
jge 0x41826f
mov dword [esp + 0x10], ebp
jmp 0x41831b
push 0x4000
push ebx
push edi
call fcn.0040a670
mov esi, eax
add esp, 0xc
cmp esi, 1
jl 0x4182b6
mov eax, dword [esp + 0x14]
push esi
push ebx
push eax
call fcn.0040a6a0
add esp, 0xc
cmp eax, esi
jne 0x418266
cmp esi, 0x4000
jl 0x4182b6
push 0x4000
push ebx
push edi
call fcn.0040a670
mov esi, eax
add esp, 0xc
cmp esi, 1
jge 0x418285
push edi
call fcn.0040a630
or esi, 0xffffffff
xor edi, edi
add esp, 4
xor eax, eax
cmp dword [0x464a98], edi
mov dword [esp + 0x1c], esi
jle 0x4182fe
xor ecx, ecx
jmp 0x4182e0
mov edx, dword [0x464bc0]
mov dword [ecx + edx + 0x918], edi
add eax, 1
add ecx, 0x1008
cmp eax, dword [0x464a98]
jl 0x4182e0
mov eax, dword [esp + 0x14]
push eax
call fcn.0040a630
add esp, 4
cmp eax, edi
mov dword [esp + 0x14], esi
je 0x41831b
mov dword [esp + 0x10], 1
pop ebp
test ebx, ebx
je 0x41833a
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x10]
cmp eax, 0xffffffff
jle 0x41834c
push eax
call fcn.0040a630
add esp, 4
mov eax, dword [esp + 0x18]
cmp eax, 0xffffffff
jle 0x41835e
push eax
call fcn.0040a630
add esp, 4
cmp byte [esp + 0x120], 0
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
je 0x418378
lea ecx, [esp + 0x120]
push ecx
call esi
mov edi, dword [esp + 0xc]
test edi, edi
je 0x418399
lea edx, [esp + 0x1c]
push edx
call esi
cmp edi, 2
jne 0x418399
push 0xae
call fcn.0040ae20
add esp, 4
mov ecx, dword [esp + 0x42c]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0043b3fc
add esp, 0x424
ret