Function at 0x4095a5
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov esi, dword [ebp + 0xc]
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
mov dword [0x4749e0], 0x55004e
mov dword [0x4749e4], 0x4c
test esi, esi
jne 0x4095fe
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0x4741e0
mov eax, dword [ebp + 8]
mov dword [esp], eax
call ebx
sub esp, 0xc
test eax, eax
je 0x4097e6
cmp eax, 0x400
jle 0x40964d
jmp 0x4097e6
xor eax, eax
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.0040874b
sub esp, 0xc
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0x4749e0
mov dword [esp], esi
call ebx
sub esp, 0xc
test eax, eax
je 0x4097e6
cmp eax, 0x400
jle 0x4095cf
jmp 0x4097e6
mov dword [esp + 0xc], 0x4741e0
mov dword [esp + 8], 0x4749e0
mov dword [esp + 4], str._ls_ls_r_n
mov dword [esp], 0x473de0
call dword [sym.imp.USER32.dll_wsprintfA]
mov dword [ebp - 0x1c], eax
mov eax, dword [0x42e130]
mov eax, dword [eax + 0x128]
mov dword [esp], 0x4741e0
mov dword [esp + 4], eax
call fcn.0040929b
push edi
push edi
mov dword [esp + 8], 4
mov dword [esp + 4], 0xc0000000
mov dword [esp], 0x4741e0
call fcn.0040874b
sub esp, 0xc
mov edi, eax
cmp eax, 0xffffffff
je 0x4097e6
xor ecx, ecx
mov dword [esp], eax
mov dword [esp + 4], ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
push ebx
mov ebx, eax
mov eax, dword [ebp - 0x1c]
add eax, ebx
mov dword [ebp - 0x24], eax
add eax, 0xa
mov dword [esp + 4], eax
mov dword [esp], 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push esi
push esi
mov esi, eax
test eax, eax
je 0x4097dc
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00408809
sub esp, 0xc
test eax, eax
je 0x4097dc
mov dword [esp + 4], str._Rename__r_n
mov dword [esp], esi
call fcn.0040862a
push edx
push edx
lea edx, [esi + ebx]
test eax, eax
jne 0x409745
mov dword [esp + 4], str._Rename__r_n
add ebx, 0xa
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push ecx
push ecx
mov ecx, ebx
jmp 0x409784
add eax, 0xa
mov dword [ebp - 0x28], edx
mov dword [esp + 4], 0x40f689
mov dword [esp], eax
call fcn.0040862a
mov ecx, ebx
push edx
push edx
mov dword [ebp - 0x20], eax
test eax, eax
je 0x409784
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
add ecx, esi
cmp dword [ebp - 0x20], edx
jae 0x40977c
mov al, byte [edx]
dec edx
dec ecx
mov byte [ecx + 1], al
jmp 0x40976e
mov eax, dword [ebp - 0x20]
sub eax, esi
lea ecx, [eax + 1]
mov eax, dword [ebp - 0x1c]
add ecx, esi
mov dword [esp + 4], 0x473de0
xor edx, edx
mov dword [esp], ecx
mov dword [esp + 8], eax
call fcn.00408695
mov eax, dword [ebp - 0x1c]
sub esp, 0xc
mov dword [esp + 0xc], edx
add ebx, eax
mov dword [esp + 8], edx
mov dword [esp + 4], edx
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
sub esp, 0x10
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], edi
call fcn.0040884d
sub esp, 0xc
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ecx
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret