Function at 0x41d21f
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 [0x43f9a8]
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 0x41d30b
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 0x41d30b
cmp dword [ebp - 8], 0x4e20
jae 0x41d30b
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.0041d4da
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 0x41d308
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 [0x43f9a8]
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 0x41d498
test ebx, ebx
je 0x41d498
cmp esi, ebx
je 0x41d48d
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0041d4da
add esp, 0xc
mov dword [ebp - 0x38], eax
test eax, eax
jne 0x41d369
push esi
call edi
mov eax, ebx
jmp 0x41d49c
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 0x41d482
test eax, eax
je 0x41d482
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 0x41d449
cmp eax, esi
je 0x41d449
push ebx
lea eax, [ebp - 0x664]
push dword [ebp - 0xc]
push esi
push eax
call dword [ebp - 0x24]
test eax, eax
je 0x41d449
push dword [ebp - 8]
lea eax, [ebp - 0x24c]
push dword [ebp - 0x34]
push esi
push eax
call dword [ebp - 0x24]
test eax, eax
je 0x41d449
lea eax, [ebp - 0xc]
mov esi, 0x43fab8
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.0041d4ac
pop ecx
cmp al, 0x3c
pop ecx
je 0x41d4a1
jle 0x41d454
cmp al, 0x3e
jg 0x41d454
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 0x41d470
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x10]
call ebx
cmp dword [ebp - 0x1c], 0
je 0x41d488
push dword [ebp - 0x1c]
call esi
push dword [ebp - 0x1c]
call ebx
jmp 0x41d488
push esi
mov dword [ebp - 4], ebx
call edi
push dword [ebp - 0x38]
jmp 0x41d491
mov dword [ebp - 4], ebx
push esi
call edi
mov eax, dword [ebp - 4]
jmp 0x41d49c
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 0x41d452