Function at 0x5d3d60
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x28
push ebx
mov ebx, dword [esp + 0x30]
push ebp
push esi
push edi
lea ebp, [ebx + 0x3c]
mov dword [ebx + 0x38], 0
mov dword [ebp], 0
lea esp, [esp]
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.005d3640
add esp, 8
test eax, eax
je 0x5d3fcb
mov ecx, dword [esp + 0x14]
mov eax, ecx
sub eax, 2
je 0x5d3e92
dec eax
je 0x5d3dc8
cmp ecx, 4
jne 0x5d3d80
cmp dword [ebx + 0x18], 0
jne 0x5d3fa6
pop edi
pop esi
pop ebp
mov dword [ebx + 0x40], 0x69
xor eax, eax
pop ebx
add esp, 0x28
ret
mov eax, dword [ebx + 0x48]
test byte [eax], 8
je 0x5d3fc4
mov ecx, dword [eax + 0x3c]
test ecx, ecx
je 0x5d3dea
push 1
lea eax, [esp + 0x40]
push eax
push ebx
call ecx
add esp, 0xc
jmp 0x5d3dff
push dword [eax + 0x38]
lea eax, [esp + 0x40]
push 1
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x5d3fb3
movzx esi, byte [esp + 0x3c]
lea eax, [esp + 0x10]
push eax
push ebx
call fcn.005d3250
add esp, 8
test eax, eax
je 0x5d3fcb
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x5d3d80
lea eax, [ecx + 1]
push eax
movzx eax, byte [ecx]
push eax
push esi
push ebp
lea esi, [ebx + 0x38]
push esi
call fcn.005d4040
add esp, 0x14
test eax, eax
je 0x5d3fcb
lea ecx, [ecx]
lea eax, [esp + 0x10]
push eax
push ebx
call fcn.005d3250
add esp, 8
test eax, eax
je 0x5d3fcb
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x5d3d80
lea eax, [ecx + 1]
push eax
movzx eax, byte [ecx]
push eax
push 0
push ebp
push esi
call fcn.005d4040
add esp, 0x14
test eax, eax
jne 0x5d3e50
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
push ebx
call fcn.005d3300
add esp, 4
test eax, eax
je 0x5d3fcb
mov eax, dword [ebx + 0x18]
lea ecx, [eax + eax*8]
mov eax, dword [ebx + 0x34]
lea edi, [eax + ecx*4]
mov ecx, dword [edi - 0x1c]
test ecx, ecx
jns 0x5d3ecd
mov esi, dword [edi - 0x18]
test esi, esi
jns 0x5d3ecd
mov eax, 0x7fffffff
cdq
idiv esi
cmp ecx, eax
jg 0x5d3fcb
mov esi, dword [edi - 0x18]
imul esi, ecx
cmp esi, 0xffffffff
ja 0x5d3fcb
push 1
push esi
push 0
call fcn.005d42a0
add esp, 0xc
mov dword [edi - 0xc], eax
test eax, eax
je 0x5d3fcb
cmp byte [edi - 0x14], 0
je 0x5d3f7e
mov dword [esp + 0x18], 0
xor ebp, ebp
mov dword [esp + 0x1c], 4
mov dword [esp + 0x20], 2
mov dword [esp + 0x24], 1
mov dword [esp + 0x28], 8
mov dword [esp + 0x2c], 8
mov dword [esp + 0x30], 4
mov dword [esp + 0x34], 2
mov esi, dword [esp + ebp + 0x18]
cmp esi, dword [edi - 0x18]
jge 0x5d3f71
lea esp, [esp]
mov eax, dword [edi - 0x1c]
push eax
imul eax, esi
add eax, dword [edi - 0xc]
push eax
push ebx
call fcn.005d3580
add esp, 0xc
test eax, eax
je 0x5d3fcb
add esi, dword [esp + ebp + 0x28]
cmp esi, dword [edi - 0x18]
jl 0x5d3f50
add ebp, 4
cmp ebp, 0x10
jl 0x5d3f40
lea ebp, [ebx + 0x3c]
jmp 0x5d3f8d
push esi
push eax
push ebx
call fcn.005d3580
add esp, 0xc
test eax, eax
je 0x5d3fcb
mov eax, dword [ebp]
test eax, eax
je 0x5d3d80
mov dword [edi - 4], eax
mov eax, dword [ebx + 0x38]
mov dword [edi - 8], eax
jmp 0x5d3d6e
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x28
ret
pop edi
pop esi
pop ebp
mov dword [ebx + 0x40], 0x66
xor eax, eax
pop ebx
add esp, 0x28
ret
mov dword [ebx + 0x40], 0x6f
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x28
ret