Function at 0x587020
Capabilities:
Get file size

Disassembly:
sub esp, 0x24
mov eax, dword [ecx + 0xc]
push edi
push 0
push 0
push 3
push 0
push 3
mov dword [esp + 0x24], ecx
mov ecx, dword [eax + 0x30]
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [esp + 8], edi
cmp edi, 0xffffffff
jne 0x587056
xor eax, eax
pop edi
add esp, 0x24
ret
push ebp
push esi
lea edx, [esp + 0x14]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
xor esi, esi
cmp ebp, 0xffffffff
jne 0x58708b
test esi, esi
jne 0x58708b
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x58708b
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop ebp
xor eax, eax
pop edi
add esp, 0x24
ret
mov eax, dword [esp + 0x14]
push ebx
push 1
push 0
push 0
push eax
call fcn.00617ef0
mov ecx, dword [esp + 0x1c]
add ebp, eax
mov eax, dword [ecx + 0xb0]
adc esi, edx
mov dword [esp + 0x30], esi
xor esi, esi
xor edi, edi
xor ebx, ebx
test eax, eax
je 0x587120
mov eax, dword [eax + 0x58]
test eax, eax
je 0x587120
mov eax, dword [eax + 0x10]
test eax, eax
je 0x587120
push ebx
push ebx
push 3
push ebx
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x587120
lea edx, [esp + 0x18]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x58710c
test edi, edi
jne 0x58710c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x58710c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
jmp 0x587120
mov eax, dword [esp + 0x18]
push 1
push 0
push 0
push eax
call fcn.00617ef0
add esi, eax
adc edi, edx
mov edx, dword [esp + 0x1c]
mov eax, esi
add eax, ebp
mov ecx, edi
adc ecx, dword [esp + 0x30]
cmp eax, dword [edx + 0x1c0]
jne 0x58713e
cmp ecx, dword [edx + 0x1c4]
je 0x58715c
mov ecx, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
test ebx, ebx
je 0x587152
push ebx
call esi
pop ebx
pop esi
pop ebp
xor eax, eax
pop edi
add esp, 0x24
ret
mov ecx, dword [esp + 0x30]
fldz
lea eax, [esp + 0x24]
fstp qword [esp + 0x24]
push eax
mov eax, dword [esp + 0x18]
push ecx
push ebp
push eax
mov ecx, edx
mov dword [esp + 0x30], 0
call fcn.00586ea0
test eax, eax
je 0x587215
fld qword [esp + 0x24]
fcom qword [0x6737f8]
fnstsw ax
test ah, 0x44
jp 0x58719e
fstp st(0)
jmp 0x58720d
fmul qword [0x6796f0]
mov edx, esi
fnstcw word [esp + 0x10]
movzx eax, word [esp + 0x10]
or eax, 0xc00
or edx, edi
mov dword [esp + 0x24], eax
fldcw word [esp + 0x24]
fistp qword [esp + 0x24]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x24], ecx
fldcw word [esp + 0x10]
mov dword [esp + 0x10], 0
jne 0x587235
mov edi, dword [esp + 0x30]
mov eax, dword [esp + 0x14]
mov esi, ebp
lea ecx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x20]
push edi
push esi
push eax
call fcn.00585570
test eax, eax
je 0x587215
mov ecx, dword [esp + 0x24]
mov eax, 0x51eb851f
mul ecx
shr edx, 4
add edx, dword [esp + 0x10]
cmp ecx, edx
ja 0x587215
mov dword [esp + 0x20], 1
mov edx, dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
test ebx, ebx
je 0x587229
push ebx
call esi
mov eax, dword [esp + 0x20]
pop ebx
pop esi
pop ebp
pop edi
add esp, 0x24
ret
mov eax, ebx
jmp 0x5871e2