Function at 0x4055d0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x70
mov eax, dword [ebp + 8]
lea esi, [eax + eax*4]
shl esi, 4
mov ebx, dword [0x451d24]
lea edi, [ebx + esi]
add edi, 0x3a8
cmp dword [ebx + 8], 0
je 0x4056a3
mov eax, dword [ebx + 0x58]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x5c]
mov dword [esp + 8], eax
push 0x1a4
push 0x8301
push dword [edi]
call sub.api_ms_win_crt_stdio_l1_1_0.dll__open
add esp, 0xc
test eax, eax
js 0x4057f5
mov dword [ebx + esi + 0x3ac], eax
mov edi, dword [ebx + esi + 0x3b0]
push 0
push edi
push dword [esp + 0x10]
push dword [esp + 0x10]
call fcn.0040d300
add esp, 0x10
mov dword [ebx + esi + 0x3bc], edx
mov dword [ebx + esi + 0x3b8], eax
mov dword [ebx + 0x4c], 0
mov dword [ebx + 0x54], edi
mov eax, 0x1000
xor edx, edx
div edi
mov dword [ebx + 0x80], eax
mov eax, dword [ebx + esi + 0x3bc]
mov ecx, dword [ebx + esi + 0x3b8]
add dword [ebx + 0x60], ecx
adc dword [ebx + 0x64], eax
cmp dword [ebx + 8], 0
je 0x40569c
call fcn.00402360
mov esi, 0xffffffff
test eax, eax
jne 0x405822
xor esi, esi
jmp 0x405822
mov eax, dword [edi]
xorps xmm0, xmm0
movaps xmmword [esp + 0x50], xmm0
movaps xmmword [esp + 0x40], xmm0
movaps xmmword [esp + 0x20], 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
sub esp, 0x1c
movaps xmm0, xmmword [0x451de0]
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x80
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
je 0x405747
mov dword [esp + 0xc], edi
lea edi, [esp + 0x1c]
lea ecx, [esp + 0x40]
push 0
push edi
push 0x20
push ecx
push 0x20
push ecx
push 0x74004
push eax
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40577d
mov eax, dword [esp + 0x48]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 8], eax
jmp 0x4057c6
cmp dword [ebx + 0x638], 0
mov esi, 0xffffffff
js 0x405822
cmp dword [ebx + 0x684], 0
jne 0x405822
cmp dword [ebx + 0x688], 0
jne 0x405822
push str._tError:_Failed_to_get_device_size_
jmp 0x40581a
lea eax, [esp + 0x20]
push 0
push edi
push 0x18
push eax
push 0x18
push eax
push 0x70000
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40582c
mov ecx, dword [esp + 0x30]
imul ecx, dword [esp + 0x34]
imul ecx, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
mov eax, ecx
mul dword [esp + 0x20]
mov dword [esp + 4], eax
imul edi, ecx
add edx, edi
mov dword [esp + 8], edx
mov edi, dword [esp + 0xc]
mov eax, dword [esp]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebx + 8], 0
jne 0x40560c
push 0x8002
push dword [edi]
call sub.api_ms_win_crt_stdio_l1_1_0.dll__open
add esp, 8
test eax, eax
jns 0x405628
cmp dword [ebx + 0x638], 0
mov esi, 0xffffffff
js 0x405822
cmp dword [ebx + 0x684], 0
jne 0x405822
cmp dword [ebx + 0x688], 0
jne 0x405822
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
lea eax, [esp + 0x10]
push eax
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov ecx, eax
test eax, eax
je 0x405849
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov dword [esp + 4], ecx
jmp 0x405741