Function at 0x4097b9
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2854
call fcn.0044ddb0
push ebx
push esi
push edi
push dword [ebp + 0x10]
call fcn.00409c82
cmp eax, 0xffffffff
pop ecx
mov dword [ebp - 0x18], eax
je 0x409a05
xor ebx, ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, ebx
jbe 0x4099fc
lea eax, [esi + 1]
push eax
call sub.msvcrt.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov edi, eax
push esi
push edi
push dword [ebp - 0x18]
mov dword [ebp - 0x10], edi
call fcn.0040a8ae
mov byte [edi + esi], bl
add esp, 0xc
mov edi, 0x3ff
push edi
lea eax, [ebp - 0x417]
push ebx
push eax
mov dword [ebp - 0x14], ebx
mov byte [ebp - 0x418], bl
call sub.msvcrt.dll_memset
add esp, 0xc
push edi
lea eax, [ebp - 0x284f]
push ebx
xor esi, esi
push eax
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], esi
mov byte [ebp - 0x2850], bl
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x1c38
lea eax, [ebp - 0x2450]
push ebx
push eax
call sub.msvcrt.dll_memset
mov ebx, dword [ebp - 0x10]
add esp, 0xc
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x418]
push eax
call fcn.00408e8b
test eax, eax
je 0x4099f3
jmp 0x409887
mov esi, dword [ebp - 4]
xor ebx, ebx
cmp dword [ebp - 0xc], ebx
jle 0x4099d5
lea eax, [ebp - 0x418]
push 0x453e44
push eax
call sub.msvcrt.dll_strcmp
test eax, eax
pop ecx
pop ecx
jne 0x4098dd
cmp dword [ebp - 8], ebx
je 0x4098ce
mov byte [ebp - 0x2450], bl
mov byte [ebp - 0x2050], bl
mov byte [ebp - 0x1c50], bl
mov byte [ebp - 0x1850], bl
mov byte [ebp - 0x2850], bl
jmp 0x4098d5
mov dword [ebp - 8], 1
mov dword [ebp - 4], ebx
jmp 0x4099d5
cmp dword [ebp - 8], ebx
je 0x4099d5
cmp esi, ebx
jne 0x4098f9
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x2850]
jmp 0x409933
cmp esi, 1
jne 0x40990d
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x1c50]
jmp 0x409933
cmp esi, 2
jne 0x409921
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x2450]
jmp 0x409933
cmp esi, 3
jne 0x409940
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x1850]
push eax
call sub.msvcrt.dll_strcpy
pop ecx
pop ecx
jmp 0x4099d2
cmp esi, 4
jne 0x4099ae
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x2050]
push eax
call sub.msvcrt.dll_strcpy
push edi
lea eax, [ebp - 0x817]
push ebx
push eax
mov byte [ebp - 0x818], bl
call sub.msvcrt.dll_memset
add esp, 0x14
lea eax, [ebp - 0x818]
push eax
push dword [ebp + 0xc]
call fcn.0040aca5
pop ecx
pop ecx
push dword [ebp + 0x14]
lea esi, [ebp - 0x2850]
push dword [ebp + 0x10]
push dword [ebp + 8]
call fcn.00408f0a
mov byte [ebp - 0x2450], bl
mov byte [ebp - 0x2050], bl
mov byte [ebp - 0x1c50], bl
mov byte [ebp - 0x1850], bl
jmp 0x4099d2
jle 0x4099d2
cmp byte [ebp - 0x418], bl
je 0x4099cf
lea eax, [ebp - 0x418]
push 0x453e48
push eax
call sub.msvcrt.dll_strcmp
test eax, eax
pop ecx
pop ecx
jne 0x4099d2
mov dword [ebp - 4], ebx
inc dword [ebp - 4]
mov ebx, dword [ebp - 0x10]
inc dword [ebp - 0xc]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x418]
push eax
call fcn.00408e8b
test eax, eax
jne 0x409884
push dword [ebp - 0x10]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
pop ecx
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
leave
ret 0x10