Function at 0x40b19f
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 [0x422f7c]
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 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40b28b
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 0x40b28b
cmp dword [ebp - 8], 0x4e20
jae 0x40b28b
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.0040b45a
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 0x40b288
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 [0x422f7c]
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 0x40b418
test ebx, ebx
je 0x40b418
cmp esi, ebx
je 0x40b40d
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x2c]
push eax
call fcn.0040b45a
add esp, 0xc
mov dword [ebp - 0x38], eax
test eax, eax
jne 0x40b2e9
push esi
call edi
mov eax, ebx
jmp 0x40b41c
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 0x40b402
test eax, eax
je 0x40b402
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 0x40b3c9
cmp eax, esi
je 0x40b3c9
push ebx
lea eax, [ebp - 0x664]
push dword [ebp - 0xc]
push esi
push eax
call dword [ebp - 0x24]
test eax, eax
je 0x40b3c9
push dword [ebp - 8]
lea eax, [ebp - 0x24c]
push dword [ebp - 0x34]
push esi
push eax
call dword [ebp - 0x24]
test eax, eax
je 0x40b3c9
lea eax, [ebp - 0xc]
mov esi, 0x42308c
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.0040b42c
pop ecx
cmp al, 0x3c
pop ecx
je 0x40b421
jle 0x40b3d4
cmp al, 0x3e
jg 0x40b3d4
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 0x40b3f0
push dword [ebp - 0x10]
call esi
push dword [ebp - 0x10]
call ebx
cmp dword [ebp - 0x1c], 0
je 0x40b408
push dword [ebp - 0x1c]
call esi
push dword [ebp - 0x1c]
call ebx
jmp 0x40b408
push esi
mov dword [ebp - 4], ebx
call edi
push dword [ebp - 0x38]
jmp 0x40b411
mov dword [ebp - 4], ebx
push esi
call edi
mov eax, dword [ebp - 4]
jmp 0x40b41c
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 0x40b3d2