Function at 0x404cd0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x70
mov edi, dword [ebp + 8]
mov ebx, dword [0x456b50]
shl edi, 6
cmp dword [ebx + 8], 0
lea esi, [ebx + edi + 0x3a8]
je 0x404d98
mov eax, dword [ebx + 0x58]
mov dword [esp], eax
mov eax, dword [ebx + 0x5c]
mov dword [esp + 8], eax
mov eax, dword [esi]
push 0x1a4
push 0x8301
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll__open
add esp, 0xc
test eax, eax
js 0x404f07
mov dword [ebx + edi + 0x3ac], eax
mov esi, dword [ebx + edi + 0x3b0]
push 0
push esi
push dword [esp + 0x10]
push dword [esp + 0xc]
call fcn.0040bef0
add esp, 0x10
mov ecx, eax
mov dword [ebx + edi + 0x3b8], eax
mov dword [ebx + edi + 0x3bc], edx
mov dword [esp], edx
mov eax, 0x1000
xor edx, edx
mov dword [ebx + 0x4c], 0
mov dword [ebx + 0x54], esi
div esi
mov dword [ebx + 0x80], eax
add dword [ebx + 0x60], ecx
mov ecx, dword [esp]
adc dword [ebx + 0x64], ecx
cmp dword [ebx + 8], 0
je 0x404d91
call fcn.00402120
mov esi, 0xffffffff
test eax, eax
jne 0x404f22
xor esi, esi
jmp 0x404f22
mov eax, dword [esi]
xorps xmm0, xmm0
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
movaps xmmword [esp + 0x50], xmm0
movaps xmmword [esp + 0x40], xmm0
movaps xmmword [esp + 0x20], xmm0
push 0
push pe_nt_image_headers32
push 3
push 0
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x404e2f
mov dword [esp + 0xc], esi
lea esi, [esp + 0x1c]
lea ecx, [esp + 0x40]
push 0
push esi
push 0x20
push ecx
push 0x20
push ecx
push 0x74004
push eax
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x404e64
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
mov dword [esp], eax
mov dword [esp + 8], ecx
jmp 0x404ecc
mov dword [esp], 0
mov dword [esp + 8], 0
xor eax, eax
test al, al
jne 0x404ee5
cmp dword [ebx + 0x5b8], 0
mov esi, 0xffffffff
js 0x404f22
push str._tError:_Failed_to_get_device_size_
jmp 0x404f1a
lea eax, [esp + 0x20]
push 0
push esi
push 0x18
push eax
push 0x18
push eax
push 0x70000
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x404ea8
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x24]
imul eax, dword [esp + 0x34]
imul eax, dword [esp + 0x2c]
imul ecx, eax
mul dword [esp + 0x20]
add edx, ecx
mov dword [esp], eax
mov dword [esp + 8], edx
jmp 0x404ecc
lea eax, [esp + 0x10]
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
mov ecx, eax
je 0x404ec5
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov dword [esp + 8], eax
mov dword [esp], ecx
mov esi, dword [esp + 0xc]
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
test al, al
je 0x404e48
cmp dword [ebx + 8], 0
mov eax, dword [esi]
jne 0x404d08
push 0x8002
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll__open
add esp, 8
test eax, eax
jns 0x404d23
cmp dword [ebx + 0x5b8], 0
mov esi, 0xffffffff
js 0x404f22
push str._tError:_Failed_to_open_the_device_
call sub.api_ms_win_crt_stdio_l1_1_0.dll_puts
add esp, 4
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret