Function at 0x5d6170
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x7c
mov eax, dword [esp + 0x80]
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], esi
mov dword [esp + 0x74], edi
mov dword [esp + 0x78], ebp
call fcn.005d5eb0
test eax, eax
mov ebx, eax
je 0x5d6300
mov dword [esp + 8], 0x1b6
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll__open_1
test eax, eax
mov edi, eax
js 0x5d647e
lea eax, [esp + 0x30]
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.msvcrt.dll__fstati64]
cmp eax, 0xffffffff
je 0x5d6330
mov eax, dword [esp + 0x4c]
mov ebp, dword [esp + 0x48]
test eax, eax
je 0x5d6241
mov ebp, dword [sym.imp.msvcrt.dll__errno]
xor esi, esi
call ebp
mov dword [eax], 0x1b
call ebp
mov dword [esp + 0x1c], 5
mov eax, dword [eax]
test eax, eax
jne 0x5d6321
test edi, edi
js 0x5d6211
mov dword [esp], edi
call sub.msvcrt.dll__close_1
test ebx, ebx
je 0x5d621d
mov dword [esp], ebx
call fcn.006a4590
test esi, esi
je 0x5d6229
mov dword [esp], esi
call fcn.006a4590
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x6c]
mov esi, dword [esp + 0x70]
mov edi, dword [esp + 0x74]
mov ebp, dword [esp + 0x78]
add esp, 0x7c
ret
lea eax, [ebp + 1]
cmp ebp, eax
ja 0x5d61e1
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov esi, eax
je 0x5d6460
mov dword [esp + 8], ebp
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.msvcrt.dll__read_1
test eax, eax
mov ebp, eax
js 0x5d6332
mov dword [esp], edi
call sub.msvcrt.dll__close_1
mov ecx, dword [esp + 0x88]
lea eax, [esi + ebp]
mov edx, dword [esp + 0x88]
test ecx, ecx
cmovs edx, ebp
cmp esi, eax
mov dword [esp + 0x88], edx
jae 0x5d6473
mov edx, dword [esp + 0x84]
test edx, edx
jle 0x5d6473
movzx edx, byte [0x860890]
lea ecx, [esi + 1]
mov ebp, esi
mov dword [esp + 0x24], esi
mov edi, dword [esp + 0x84]
mov dword [esp + 0x2c], esi
mov dword [esp + 0x1c], ebx
mov byte [esp + 0x28], dl
xor edx, edx
jmp 0x5d62e2
add ecx, 1
cmp edx, edi
jge 0x5d6340
cmp eax, esi
jbe 0x5d6340
cmp byte [ecx - 1], 0xa
mov esi, ecx
jne 0x5d62d7
movzx ebx, byte [esp + 0x28]
cmp byte [ecx], bl
je 0x5d6416
add edx, 1
mov ebp, ecx
jmp 0x5d62d7
mov ebp, dword [sym.imp.msvcrt.dll__errno]
xor esi, esi
mov edi, 0xffffffff
call ebp
mov dword [esp + 0x1c], 5
mov eax, dword [eax]
test eax, eax
je 0x5d6205
call ebp
mov eax, dword [eax]
mov dword [esp + 0x1c], eax
jmp 0x5d6205
xor esi, esi
mov ebp, dword [sym.imp.msvcrt.dll__errno]
jmp 0x5d61f1
mov esi, dword [esp + 0x2c]
mov ebx, dword [esp + 0x1c]
mov dword [esp + 0x24], ebp
cmp dword [esp + 0x24], eax
jae 0x5d63f9
mov edi, dword [esp + 0x24]
mov ebp, dword [esp + 0x24]
mov dword [esp + 0x28], ebx
mov ebx, eax
mov dword [esp + 0x20], 0
add edi, 1
mov dword [esp + 0x24], esi
jmp 0x5d637c
add edi, 1
cmp esi, ebx
jae 0x5d63f1
cmp byte [edi - 1], 0xa
mov esi, edi
lea ecx, [edi - 1]
jne 0x5d6375
cmp ebp, ecx
jae 0x5d6395
cmp byte [edi - 2], 0xd
je 0x5d6430
mov byte [edi - 1], 0
movzx eax, byte [ebp]
test al, al
je 0x5d63e1
cmp al, byte [0x860890]
je 0x5d6440
mov dword [esp], ebp
mov dword [esp + 0x18], edx
call fcn.005cbc50
mov ebp, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
test ebp, ebp
je 0x5d63e1
mov eax, dword [esp + 0x20]
mov dword [esp + 0x18], edx
mov dword [esp], eax
call fcn.005cbb90
mov edx, dword [esp + 0x18]
mov dword [esp + 0x20], 0
add edx, 1
cmp dword [esp + 0x88], edx
jle 0x5d63f1
mov ebp, edi
jmp 0x5d6375
mov esi, dword [esp + 0x24]
mov ebx, dword [esp + 0x28]
mov dword [esp], ebx
call fcn.006a4590
mov dword [esp], esi
call fcn.006a4590
mov dword [esp + 0x1c], 0
jmp 0x5d6229
movsx ebp, byte [ecx + 1]
sub ebp, 0x30
cmp ebp, 9
ja 0x5d62f7
mov ebp, ecx
jmp 0x5d62d7
mov byte [edi - 2], 0
jmp 0x5d6399
movsx eax, byte [ebp + 1]
sub eax, 0x30
cmp eax, 9
ja 0x5d63ad
sub edx, 1
mov dword [esp + 0x20], ebp
jmp 0x5d63e1
mov ebp, dword [sym.imp.msvcrt.dll__errno]
call ebp
mov dword [eax], 0x1b
jmp 0x5d61f1
mov dword [esp + 0x24], esi
xor edx, edx
jmp 0x5d634c
xor esi, esi
mov ebp, dword [sym.imp.msvcrt.dll__errno]
jmp 0x5d61f1