Function at 0x40a7ed
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov dword [0x44ba00], 0x55004e
mov esi, dword [ebp + 0xc]
mov dword [0x44ba04], 0x4c
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test esi, esi
jne 0x40a846
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0x44b200
mov eax, dword [ebp + 8]
mov dword [esp], eax
call ebx
sub esp, 0xc
test eax, eax
je 0x40aa2e
cmp eax, 0x400
jle 0x40a895
jmp 0x40aa2e
mov dword [esp + 8], 1
xor eax, eax
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.004098bd
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], 0x44ba00
mov dword [esp], esi
call ebx
sub esp, 0xc
test eax, eax
je 0x40aa2e
cmp eax, 0x400
jle 0x40a817
jmp 0x40aa2e
mov dword [esp + 0xc], 0x44b200
mov dword [esp + 8], 0x44ba00
mov dword [esp + 4], str._ls_ls_r_n
mov dword [esp], 0x44ae00
call dword [sym.imp.USER32.dll_wsprintfA]
mov dword [ebp - 0x1c], eax
mov eax, dword [0x41d150]
mov eax, dword [eax + 0x128]
mov dword [esp], 0x44b200
mov dword [esp + 4], eax
call fcn.0040a4df
push edi
push edi
mov dword [esp + 8], 4
mov dword [esp + 4], 0xc0000000
mov dword [esp], 0x44b200
call fcn.004098bd
sub esp, 0xc
cmp eax, 0xffffffff
mov edi, eax
je 0x40aa2e
mov dword [esp], eax
xor ecx, ecx
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
test eax, eax
push esi
mov esi, eax
je 0x40aa24
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.0040997b
sub esp, 0xc
test eax, eax
je 0x40aa24
mov dword [esp + 4], str._Rename__r_n
mov dword [esp], esi
call fcn.0040979c
push edx
test eax, eax
push edx
lea edx, [esi + ebx]
jne 0x40a98d
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 0x40a9cc
mov dword [ebp - 0x28], edx
add eax, 0xa
mov dword [esp + 4], 0x4106d7
mov dword [esp], eax
call fcn.0040979c
mov ecx, ebx
push edx
test eax, eax
push edx
mov dword [ebp - 0x20], eax
je 0x40a9cc
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
add ecx, esi
cmp dword [ebp - 0x20], edx
jae 0x40a9c4
mov al, byte [edx]
dec edx
dec ecx
mov byte [ecx + 1], al
jmp 0x40a9b6
mov eax, dword [ebp - 0x20]
sub eax, esi
lea ecx, [eax + 1]
mov eax, dword [ebp - 0x1c]
add ecx, esi
xor edx, edx
mov dword [esp], ecx
mov dword [esp + 4], 0x44ae00
mov dword [esp + 8], eax
call fcn.00409807
mov eax, dword [ebp - 0x1c]
add ebx, eax
sub esp, 0xc
mov dword [esp + 0xc], edx
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.004099bf
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