Function at 0x45e7d3
Capabilities:
Get common file path
Get file size
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x664
push ebx
push esi
push edi
lea eax, [ebp - 0x354]
xor edi, edi
push 0x105
push eax
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push dword [0x48a020]
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x354]
push eax
lea eax, [ebp - 0x24c]
push str._s_s
push eax
call esi
add esp, 0x10
lea eax, [ebp - 0x24c]
push edi
push 0x10000080
push 3
push edi
push 3
push bind
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x45e8bf
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 8], 0xffffffff
je 0x45e8bf
cmp dword [ebp - 8], 0x4e20
jae 0x45e8bf
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.0045ea8e
add esp, 0xc
mov ebx, eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x24c]
push eax
call dword [ebp - 0x20]
test eax, eax
jne 0x45e8bc
lea eax, [ebp - 0x354]
push eax
lea eax, [ebp - 0x458]
push str._sodbccp32.bad
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0x458]
push 3
push eax
lea eax, [ebp - 0x24c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
push ebx
call edi
push dword [0x48a020]
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
call esi
mov ebx, eax
lea eax, [ebp - 0x24c]
push eax
mov dword [ebp - 0x14], ebx
call esi
mov esi, eax
test esi, esi
mov dword [ebp - 0x18], esi
je 0x45ea4c
test ebx, ebx
je 0x45ea4c
cmp esi, ebx
je 0x45ea41
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0045ea8e
add esp, 0xc
mov dword [ebp - 0x38], eax
test eax, eax
jne 0x45e91d
push esi
call edi
mov eax, ebx
jmp 0x45ea50
lea eax, [ebp - 0x664]
push 0x20a
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x24c]
push eax
call dword [ebp - 0x2c]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x664]
push eax
call dword [ebp - 0x2c]
cmp dword [ebp - 0xc], 0
mov dword [ebp - 0x34], eax
je 0x45ea36
test eax, eax
je 0x45ea36
push dword [ebp - 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0
call esi
push dword [ebp - 0x34]
mov dword [ebp - 0x10], eax
push 0
call esi
push dword [ebp - 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_LocalLock]
mov dword [ebp - 0x1c], eax
call esi
push dword [ebp - 0x1c]
mov ebx, eax
call esi
xor esi, esi
mov dword [ebp - 8], eax
cmp ebx, esi
je 0x45e9fd
cmp eax, esi
je 0x45e9fd
push ebx
lea eax, [ebp - 0x664]
push dword [ebp - 0xc]
push esi
push eax
call dword [ebp - 0x24]
test eax, eax
je 0x45e9fd
push dword [ebp - 8]
lea eax, [ebp - 0x24c]
push dword [ebp - 0x34]
push esi
push eax
call dword [ebp - 0x24]
test eax, eax
je 0x45e9fd
lea eax, [ebp - 0xc]
mov esi, 0x48a130
push eax
lea eax, [ebp - 0x30]
push eax
push esi
push ebx
call dword [ebp - 0x20]
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x28]
push eax
push esi
push dword [ebp - 8]
call dword [ebp - 0x20]
push dword [ebp - 0x28]
push dword [ebp - 0x30]
call fcn.0045ea60
pop ecx
cmp al, 0x3c
pop ecx
je 0x45ea55
jle 0x45ea08
cmp al, 0x3e
jg 0x45ea08
mov eax, dword [ebp - 0x14]
push dword [ebp - 0x18]
mov dword [ebp - 4], eax
call edi
cmp dword [ebp - 0x10], 0
mov esi, dword [sym.imp.KERNEL32.dll_LocalUnlock]
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
je 0x45ea24
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x10]
call ebx
cmp dword [ebp - 0x1c], 0
je 0x45ea3c
push dword [ebp - 0x1c]
call esi
push dword [ebp - 0x1c]
call ebx
jmp 0x45ea3c
push esi
mov dword [ebp - 4], ebx
call edi
push dword [ebp - 0x38]
jmp 0x45ea45
mov dword [ebp - 4], ebx
push esi
call edi
mov eax, dword [ebp - 4]
jmp 0x45ea50
mov eax, esi
or eax, ebx
pop edi
pop esi
pop ebx
leave
ret
mov eax, dword [ebp - 0x18]
push dword [ebp - 0x14]
mov dword [ebp - 4], eax
jmp 0x45ea06