Function at 0x1006cf6
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x1013568]
mov ecx, dword [0x1017938]
push ebx
push esi
mov esi, dword [0x1013574]
mov edx, dword [esi + 4]
lea ebx, [edx + eax + 1]
mov eax, dword [0x1013578]
push edi
mov edi, ecx
cmp eax, ebx
jbe 0x1006d2d
push 0x1001408
call fcn.01006bf6
cmp dword [esi + 0x20], 0
jne 0x1006d45
sub eax, ecx
xor ecx, ecx
cmp eax, 1
setne cl
inc ecx
mov eax, ecx
jmp 0x1006f13
mov ebx, eax
sub ebx, ecx
dec ebx
test ebx, ebx
jle 0x1006d5c
mov dword [ebp - 4], ebx
mov cl, byte [edi]
mov byte [edx], cl
inc edx
inc edi
dec dword [ebp - 4]
jne 0x1006d51
cmp dword [esi + 0x24], 2
jne 0x1006d71
xor eax, eax
mov dword [0x1013568], eax
mov dword [esi + 0x10], eax
jmp 0x1006eca
mov edi, dword [esi + 0xc]
sub edi, ebx
dec edi
xor edx, edx
jmp 0x1006de4
mov edi, dword [esi + 4]
sub eax, edi
mov dword [ebp - 8], eax
mov dword [ebp - 4], edx
cmp dword [esi + 0x14], edx
je 0x1006dc4
mov eax, dword [esi + 0xc]
lea ecx, [eax + eax]
cmp ecx, edx
jg 0x1006d9c
mov ecx, eax
shr ecx, 3
add ecx, eax
lea eax, [ebp - 4]
push eax
push 2
push ecx
mov dword [esi + 0xc], ecx
call fcn.01006a19
test eax, eax
jl 0x1006e62
push dword [ebp - 4]
push edi
call dword [sym.imp.msvcrt.dll_realloc]
pop ecx
pop ecx
mov dword [esi + 4], eax
jmp 0x1006dc7
mov dword [esi + 4], edx
mov eax, dword [esi + 4]
xor edx, edx
cmp eax, edx
je 0x1006e6c
mov ecx, dword [ebp - 8]
mov edi, dword [esi + 0xc]
add eax, ecx
sub edi, ebx
mov dword [0x1013578], eax
dec edi
cmp edi, edx
jle 0x1006d7b
mov eax, 0x2000
cmp edi, eax
jle 0x1006df3
mov edi, eax
cmp dword [esi + 0x18], edx
je 0x1006e86
cmp edi, edx
mov dword [ebp - 4], edx
jle 0x1006e7c
push dword [0x1013580]
call dword [sym.imp.msvcrt.dll_getc]
mov esi, dword [0x1013574]
pop ecx
cmp eax, 0xffffffff
je 0x1006e31
cmp eax, 0xa
je 0x1006e36
mov ecx, dword [esi + 4]
add ecx, dword [ebp - 4]
inc dword [ebp - 4]
cmp dword [ebp - 4], edi
mov byte [ecx + ebx], al
jl 0x1006e03
cmp eax, 0xa
jne 0x1006e42
mov ecx, dword [esi + 4]
add ecx, dword [ebp - 4]
inc dword [ebp - 4]
mov byte [ecx + ebx], al
cmp eax, 0xffffffff
jne 0x1006e7c
push dword [0x1013580]
call dword [sym.imp.msvcrt.dll_ferror]
pop ecx
test eax, eax
je 0x1006e76
push 0x10013e8
jmp 0x1006d28
push 0x10013d4
jmp 0x1006d28
push 0x10013a8
jmp 0x1006d28
mov esi, dword [0x1013574]
mov eax, dword [ebp - 4]
mov dword [0x1013568], eax
jmp 0x1006ec3
push dword [0x1013580]
mov eax, dword [esi + 4]
push edi
add eax, ebx
push 1
push eax
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
mov dword [0x1013568], eax
test eax, eax
jne 0x1006ebd
push dword [0x1013580]
call dword [sym.imp.msvcrt.dll_ferror]
pop ecx
test eax, eax
jne 0x1006e58
mov eax, dword [0x1013568]
mov esi, dword [0x1013574]
mov dword [esi + 0x10], eax
test eax, eax
jne 0x1006ef1
test ebx, ebx
jne 0x1006ee9
push dword [0x1013580]
xor edi, edi
inc edi
call fcn.01006cbc
mov esi, dword [0x1013574]
mov eax, dword [0x1013568]
jmp 0x1006ef3
push 2
pop edi
mov dword [esi + 0x24], edi
jmp 0x1006ef3
xor edi, edi
mov ecx, dword [esi + 4]
add eax, ebx
mov byte [eax + ecx], 0
mov ecx, dword [esi + 4]
mov byte [eax + ecx + 1], 0
mov dword [0x1013568], eax
mov eax, dword [esi + 4]
mov dword [0x1017938], eax
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret