Function at 0x58c240
Capabilities:
Get file size
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x65ac38
mov eax, dword fs:[0]
push eax
sub esp, 0x34
push ebx
push ebp
push esi
push edi
mov eax, dword [0x74f8a0]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov edi, ecx
lea ecx, [esp + 0x14]
call fcn.00402500
mov dword [esp + 0x50], 0
mov ecx, dword [edi + 0x25c]
add ecx, 0x10
call fcn.005647d0
mov eax, dword [edi + 0xb0]
mov ecx, dword [eax + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push ecx
call esi
mov ebp, eax
mov dword [esp + 0x28], ebp
cmp ebp, 0xffffffff
jne 0x58c34a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 0x140], eax
cmp eax, 0x20
je 0x58c2d2
cmp eax, 5
jne 0x58c7ea
lea ecx, [esp + 0x24]
call fcn.00402500
mov byte [esp + 0x50], 1
mov edx, dword [edi + 0x140]
push edx
lea eax, [esp + 0x28]
push str.Check_for_sc__cf_failed__lastErr_ld_Sleep_1000_r_n
push eax
call fcn.00402f70
mov ecx, dword [esp + 0x30]
add esp, 0xc
push ecx
mov ecx, edi
call fcn.005abf20
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [edi + 0xb0]
mov eax, dword [edx + 0x10]
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push eax
call esi
mov esi, eax
mov dword [esp + 0x28], esi
mov byte [esp + 0x50], 0
lea ecx, [esp + 0x24]
call fcn.00402570
cmp esi, 0xffffffff
je 0x58c7ea
mov ebp, esi
mov eax, dword [edi + 0x1b8]
or eax, dword [edi + 0x1bc]
mov ecx, dword [edi + 0x1c4]
mov ebx, dword [edi + 0x1c0]
mov dword [esp + 0x44], ecx
je 0x58c374
mov edx, dword [edi + 0xc]
cmp byte [edx + 0x33b], 0
je 0x58c393
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
test ebx, ebx
jne 0x58c393
mov eax, dword [edi + 0x1c4]
mov ebx, dword [edi + 0x1c0]
mov dword [esp + 0x44], eax
lea ecx, [ebx + 1]
push ecx
call fcn.005ec342
mov esi, eax
add esp, 4
mov dword [esp + 0x18], esi
test esi, esi
je 0x58c6a2
push str.Check_for_sc__s2_r_n
mov ecx, edi
call fcn.005abf20
push 0
lea edx, [esp + 0x30]
push edx
push ebx
push esi
push ebp
mov dword [esp + 0x40], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [esp + 0x34], eax
test eax, eax
je 0x58c75e
cmp dword [esp + 0x2c], ebx
jne 0x58c75e
lea eax, [esi + ebx]
push str.Check_for_sc__s3__fc:_r_n
mov ecx, edi
mov dword [esp + 0x38], eax
mov byte [eax], 0
call fcn.005abf20
push esi
mov ecx, edi
call fcn.005abf20
push 0x6722a4
mov ecx, edi
call fcn.005abf20
lea eax, [ebx - 0xe]
push eax
push 0x53
xor ebp, ebp
push esi
mov dword [esp + 0x2c], ebp
call fcn.0061a850
mov esi, eax
add esp, 0xc
test esi, esi
je 0x58c4ec
push str.Segment_Count:
push esi
call fcn.00619720
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x58c475
mov ecx, dword [esp + 0x18]
sub esi, ecx
inc esi
mov ebp, esi
lea eax, [ebx - 0xe]
cmp ebp, eax
ja 0x58c4ec
mov eax, ebx
sub eax, ebp
sub eax, 0xe
push eax
add ecx, ebp
push 0x53
push ecx
call fcn.0061a850
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x58c430
jmp 0x58c4ec
add ebp, 0xe
mov al, byte [ebp]
cmp al, 0x20
je 0x58c48b
cmp al, 9
je 0x58c48b
cmp al, 0xd
je 0x58c48b
cmp al, 0xa
jne 0x58c48e
inc ebp
jmp 0x58c478
lea edx, [esp + 0x20]
push edx
push 0x670604
push ebp
call fcn.00619a6e
add esp, 0xc
cmp eax, 1
jne 0x58c4e7
mov eax, dword [esp + 0x20]
cmp eax, 1
jle 0x58c4e7
push eax
lea eax, [esp + 0x18]
push str.cnt_ld
push eax
call fcn.00402f70
mov ecx, dword [esp + 0x64]
mov byte [ecx], 0
mov edx, dword [edi + 0xc]
mov byte [edx + 0x33b], 0
mov eax, dword [edi + 0xc]
mov byte [eax + 0x33c], 1
mov ecx, dword [edi + 0xc]
add esp, 0xc
mov byte [ecx + 0x32a], 0
sub ebp, dword [esp + 0x18]
inc ebp
mov edx, dword [esp + 0x58]
cmp byte [edx], 0
jne 0x58c691
lea eax, [ebx - 0xe]
push eax
mov eax, dword [esp + 0x1c]
add ebp, eax
push 0x53
push ebp
call fcn.0061a850
mov esi, eax
add esp, 0xc
test esi, esi
je 0x58c691
jmp 0x58c520
push str.Segment_Durations_Ms:
push esi
call fcn.00619720
mov ebp, eax
xor ecx, ecx
add esp, 8
cmp ebp, ecx
jne 0x58c56a
sub esi, dword [esp + 0x18]
lea ecx, [ebx - 0x15]
inc esi
cmp esi, ecx
ja 0x58c691
mov eax, dword [esp + 0x18]
mov edx, ebx
sub edx, esi
sub edx, 0x15
push edx
add esi, eax
push 0x53
push esi
call fcn.0061a850
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x58c520
jmp 0x58c691
add ebp, 0x15
lea ecx, [ecx]
mov al, byte [ebp]
cmp al, 0x20
je 0x58c583
cmp al, 9
je 0x58c583
cmp al, 0xd
je 0x58c583
cmp al, 0xa
jne 0x58c586
inc ebp
jmp 0x58c570
cmp dword [esp + 0x20], ecx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], ecx
jle 0x58c691
xor esi, esi
cmp ebp, esi
je 0x58c66a
cmp byte [ebp], 0
je 0x58c66a
push 0x2c
push ebp
call fcn.00619660
mov ebx, eax
add esp, 8
cmp ebx, esi
je 0x58c5c4
mov byte [ebx], 0
lea ecx, [esp + 0x40]
push ecx
push str._I64d
push ebp
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
call fcn.00619a6e
add esp, 0xc
cmp eax, 1
jne 0x58c64f
mov edx, dword [esp + 0x40]
add dword [esp + 0x38], edx
mov eax, dword [esp + 0x44]
push 0x6a8e6c
adc dword [esp + 0x40], eax
inc dword [esp + 0x20]
push ebp
call fcn.00619720
add esp, 8
cmp eax, esi
je 0x58c64f
lea ecx, [esp + 0x30]
push ecx
add eax, 3
push 0x670604
push eax
mov dword [esp + 0x3c], esi
call fcn.00619a6e
add esp, 0xc
cmp eax, 1
jne 0x58c64f
mov ecx, dword [esp + 0x44]
mov esi, dword [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x44]
mov eax, esi
cdq
push ecx
push edx
push eax
call fcn.0061cd30
add dword [esp + 0x38], eax
adc dword [esp + 0x3c], edx
add dword [esp + 0x1c], esi
xor esi, esi
cmp ebx, esi
je 0x58c66a
lea ebp, [ebx + 1]
cmp ebp, dword [esp + 0x34]
jae 0x58c66a
mov edx, dword [esp + 0x1c]
cmp edx, dword [esp + 0x20]
jl 0x58c59c
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
mov edx, eax
or edx, ecx
je 0x58c691
push ecx
push eax
mov eax, dword [esp + 0x28]
push eax
lea ecx, [esp + 0x20]
push str.cnt_ld__dur_I64d
push ecx
call fcn.00402f70
add esp, 0x14
mov edx, dword [esp + 0x18]
push edx
call fcn.005ec337
mov ebp, dword [esp + 0x2c]
add esp, 4
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x58]
cmp byte [ecx], 0
jne 0x58c7d5
lea ecx, [esp + 0x58]
call fcn.00402500
mov byte [esp + 0x50], 4
mov ecx, dword [edi + 0xc]
push 0
lea edx, [esp + 0x5c]
push edx
call fcn.0058ae10
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x14]
push eax
push ecx
lea ecx, [edi + 0x28]
call fcn.005507b0
test eax, eax
je 0x58c81d
cmp dword [edi + 0x40], 0
je 0x58c7c7
mov edx, dword [edi + 0xc]
mov dword [edx + 0x320], 0x400
mov eax, dword [esp + 0x14]
mov ecx, dword [edi + 0xc]
push eax
add ecx, 0x308
push 0x66fea8
push ecx
call fcn.00402f70
mov edx, dword [edi + 0xb8]
mov ecx, dword [edi + 0xc]
add esp, 0xc
push edx
call fcn.005c79d0
mov ecx, edi
call fcn.0058b8a0
fld qword [0x6a3e68]
mov ecx, dword [edi + 0x40]
fcomp qword [ecx + 0x18]
fnstsw ax
test ah, 5
jp 0x58c7a5
fld qword [ecx + 0x18]
mov eax, dword [edi + 0xc]
mov ecx, edi
fstp qword [eax + 0x3a8]
call fcn.005ac2a0
jmp 0x58c7c7
lea ecx, [esp + 0x58]
call fcn.00402500
mov byte [esp + 0x50], 2
mov eax, dword [esp + 0x2c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x3c]
push eax
push ecx
lea edx, [esp + 0x68]
push str.Check_for_sc__rf_res_ld__lastErr_ld__buff_ld__read_ld_r_n
push edx
call fcn.00402f70
mov eax, dword [esp + 0x70]
add esp, 0x18
push eax
mov ecx, edi
call fcn.005abf20
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x58c81d
mov edx, dword [ecx + 0x38]
mov ecx, dword [ecx + 0x3c]
mov eax, edx
or eax, ecx
je 0x58c7c7
mov eax, dword [edi + 0xc]
mov dword [eax + 0xf0], edx
mov dword [eax + 0xf4], ecx
mov ecx, edi
call fcn.005ac3f0
mov byte [esp + 0x50], 0
lea ecx, [esp + 0x58]
call fcn.00402570
mov dword [esp + 0x50], 0xffffffff
lea ecx, [esp + 0x14]
call fcn.00402570
xor eax, eax
jmp 0x58c83f
lea ecx, [esp + 0x58]
call fcn.00402500
mov byte [esp + 0x50], 3
mov ecx, dword [edi + 0x140]
push ecx
lea edx, [esp + 0x5c]
push str.Check_for_sc__cf_failed__lastErr_ld_r_n
push edx
call fcn.00402f70
mov eax, dword [esp + 0x64]
add esp, 0xc
push eax
mov ecx, edi
call fcn.005abf20
mov byte [esp + 0x50], 0
lea ecx, [esp + 0x58]
call fcn.00402570
mov dword [esp + 0x50], 0xffffffff
lea ecx, [esp + 0x14]
call fcn.00402570
or eax, 0xffffffff
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret 4