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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x768
push ebx
push esi
push edi
push 0x105
lea eax, [ebp - 0x350]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push dword [section..data]
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x350]
push eax
lea eax, [ebp - 0x248]
push 0x4d09a8
push eax
call esi
add esp, 0x10
push 0
push 0x10000080
push 3
push 0
push 3
push closesocket
lea eax, [ebp - 0x248]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edi, eax
cmp edi, 0xffffffff
je 0x4aa034
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 8], 0xffffffff
je 0x4aa034
cmp dword [ebp - 8], 0x4e20
jae 0x4aa034
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
push eax
lea edi, [ebp - 0x1c]
call fcn.004a9eec
mov edi, eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x248]
push eax
call dword [ebp - 0x1c]
test eax, eax
jne 0x4aa031
lea eax, [ebp - 0x350]
push eax
lea eax, [ebp - 0x768]
push str._sodbccp32.bad
push eax
call esi
add esp, 0xc
push 3
lea eax, [ebp - 0x768]
push eax
lea eax, [ebp - 0x248]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
push edi
call ebx
push dword [section..data]
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
call edi
mov esi, eax
lea eax, [ebp - 0x248]
push eax
mov dword [ebp - 0x14], esi
call edi
test eax, eax
mov dword [ebp - 0xc], eax
je 0x4aa1ce
test esi, esi
je 0x4aa1ce
cmp eax, esi
je 0x4aa1c3
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x24]
push eax
lea edi, [ebp - 8]
call fcn.004a9eec
xor edi, edi
cmp eax, edi
mov dword [ebp - 0x2c], eax
jne 0x4aa090
push dword [ebp - 0xc]
call ebx
mov eax, esi
jmp 0x4aa1d0
push 0x20a
lea eax, [ebp - 0x55c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x248]
push eax
call dword [ebp - 8]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x55c]
push eax
call dword [ebp - 8]
cmp dword [ebp - 4], edi
mov dword [ebp - 0x20], eax
je 0x4aa1b6
cmp eax, edi
je 0x4aa1b6
push dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push edi
call esi
push dword [ebp - 0x20]
mov dword [ebp - 0x10], eax
push 0
call esi
push dword [ebp - 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_LocalLock]
mov dword [ebp - 0x18], eax
call esi
push dword [ebp - 0x18]
mov edi, eax
call esi
xor esi, esi
cmp edi, esi
mov dword [ebp - 8], eax
je 0x4aa17d
cmp eax, esi
je 0x4aa17d
push edi
push dword [ebp - 4]
lea eax, [ebp - 0x55c]
push esi
push eax
call dword [ebp - 0x24]
test eax, eax
je 0x4aa17d
push dword [ebp - 8]
lea eax, [ebp - 0x248]
push dword [ebp - 0x20]
push esi
push eax
call dword [ebp - 0x24]
test eax, eax
je 0x4aa17d
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x28]
push eax
mov esi, 0x4ce74c
push esi
push edi
call dword [ebp - 0x1c]
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x30]
push eax
push esi
push dword [ebp - 8]
call dword [ebp - 0x1c]
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x30]
mov ecx, dword [eax + 8]
mov esi, dword [edx + 8]
cmp ecx, esi
ja 0x4aa17d
jb 0x4aa175
mov eax, dword [eax + 0xc]
mov edx, dword [edx + 0xc]
cmp eax, edx
ja 0x4aa17d
jae 0x4aa17d
mov eax, dword [ebp - 0xc]
push dword [ebp - 0x14]
jmp 0x4aa183
mov eax, dword [ebp - 0x14]
push dword [ebp - 0xc]
mov dword [ebp - 4], eax
call ebx
cmp dword [ebp - 0x10], 0
mov esi, dword [sym.imp.KERNEL32.dll_LocalUnlock]
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
je 0x4aa1a4
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x10]
call edi
cmp dword [ebp - 0x18], 0
je 0x4aa1be
push dword [ebp - 0x18]
call esi
push dword [ebp - 0x18]
call edi
jmp 0x4aa1be
push dword [ebp - 0xc]
mov dword [ebp - 4], esi
call ebx
push dword [ebp - 0x2c]
jmp 0x4aa1c7
mov dword [ebp - 4], esi
push eax
call ebx
mov eax, dword [ebp - 4]
jmp 0x4aa1d0
or eax, esi
pop edi
pop esi
pop ebx
leave
ret