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

Disassembly:
mov eax, 0x6c86c8
call fcn.00692bd4
sub esp, 0x3c
push esi
push edi
xor esi, esi
push esi
push 0x80
push 3
push esi
push 1
push 0x80000000
push dword [ebp + 8]
mov dword [ebp - 0x24], ecx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp - 0x10], edi
jne 0x581e8d
xor al, al
jmp 0x582072
push ebx
mov dword [ebp - 0x34], edi
lea eax, [ebp - 0x2c]
push eax
push edi
mov dword [ebp - 4], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], esi
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov esi, eax
push esi
call fcn.0069197a
mov ebx, eax
test ebx, ebx
pop ecx
mov dword [ebp - 0x1c], ebx
jne 0x581ec9
test edi, edi
je 0x581ec2
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor al, al
jmp 0x582071
mov dword [ebp - 0x38], ebx
push 0
lea eax, [ebp - 0x30]
push eax
push esi
push ebx
push edi
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.DLL_ReadFile]
test eax, eax
jne 0x581eec
push ebx
call fcn.00693d31
pop ecx
jmp 0x581eb7
mov edi, dword [ebx]
add edi, 8
lea eax, [edi + ebx]
mov dword [ebp - 0x28], eax
mov eax, dword [eax - 4]
push eax
mov dword [ebp + 8], eax
call fcn.0069197a
mov ebx, eax
test ebx, ebx
pop ecx
jne 0x581f1a
push dword [ebp - 0x1c]
call fcn.00693d31
cmp dword [ebp - 0x10], ebx
jmp 0x58209b
mov dword [ebp - 0x14], ebx
lea eax, [ebp + 8]
push eax
push ebx
sub esi, edi
push esi
push dword [ebp - 0x28]
mov byte [ebp - 4], 2
call fcn.00578370
mov ecx, dword [0x732630]
add esp, 0x10
push 3
push 0
push dword [ebp + 8]
push ebx
call fcn.005782a0
mov eax, dword [ebx]
sub dword [ebp + 8], 4
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x24]
add ebx, 4
add eax, 0x18
mov edx, 0x200
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], edx
mov eax, 0x800
mov edi, dword [ebp - 0x18]
add dword [ebp - 0x18], eax
mov esi, ebx
mov ecx, edx
rep movsd dword es:[edi], dword [esi]
sub dword [ebp + 8], eax
add ebx, eax
dec dword [ebp - 0x20]
jne 0x581f69
xor edi, edi
cmp dword [ebp - 0x28], edi
mov dword [ebp - 0x18], edi
jbe 0x58204a
mov eax, dword [ebx]
sub dword [ebp + 8], 4
push 0x38
mov dword [ebp - 0x20], eax
add ebx, 4
call fcn.006918d6
mov esi, eax
pop ecx
mov dword [ebp - 0x3c], esi
cmp esi, edi
mov byte [ebp - 4], 3
je 0x581fb8
lea ecx, [esi + 0x2c]
call fcn.005833b2
jmp 0x581fba
xor esi, esi
sub dword [ebp + 8], 0x38
mov eax, ebx
add ebx, 0x38
cmp esi, edi
mov byte [ebp - 4], 2
je 0x582082
cmp eax, edi
je 0x582082
mov ecx, dword [eax + 0x20]
mov edx, esi
mov dword [esi + 0x20], ecx
mov edi, eax
sub edx, eax
mov cl, byte [edi]
mov byte [edx + edi], cl
inc edi
test cl, cl
jne 0x581fe3
mov eax, dword [eax + 0x24]
xor edi, edi
cmp dword [ebp - 0x20], edi
mov dword [esi + 0x24], eax
mov dword [esi + 0x28], edi
jbe 0x582022
mov eax, dword [ebp - 0x20]
lea edi, [esi + 0x2c]
mov dword [ebp - 0x20], eax
sub dword [ebp + 8], 4
mov eax, dword [edi + 4]
mov ecx, ebx
push ecx
push eax
mov ecx, edi
add ebx, 4
call fcn.00582575
dec dword [ebp - 0x20]
jne 0x582006
xor edi, edi
mov eax, dword [esi + 0x20]
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x40]
push eax
mov dword [ebp - 0x44], esi
call fcn.005827b1
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x28]
jb 0x581f8d
cmp dword [ebp - 0x14], edi
je 0x582058
push dword [ebp - 0x14]
call fcn.00693d31
pop ecx
push dword [ebp - 0x1c]
call fcn.00693d31
cmp dword [ebp - 0x10], edi
pop ecx
je 0x58206f
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov al, 1
pop ebx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret 4
cmp dword [ebp - 0x14], edi
je 0x582090
push dword [ebp - 0x14]
call fcn.00693d31
pop ecx
push dword [ebp - 0x1c]
call fcn.00693d31
cmp dword [ebp - 0x10], edi
pop ecx
je 0x581ec2
push dword [ebp - 0x10]
jmp 0x581ebc