Function at 0x661ba0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 8], esi
mov dword [ebp - 4], edi
mov esi, dword [ebx + 0x38]
test byte [esi], 8
jne 0x661bd3
mov dword [0xc1f620], 0x6f
xor eax, eax
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
lea eax, [ebx + 0x18]
mov dword [ebp - 0x24], eax
mov edx, eax
mov eax, ebx
call fcn.006615f0
test eax, eax
jne 0x661bf0
xor eax, eax
jmp 0x661bc6
lea edx, [ebx + 0x1c]
mov eax, ebx
call fcn.006615f0
test eax, eax
je 0x661be6
lea edx, [ebx + 0x20]
mov eax, ebx
call fcn.006615f0
test eax, eax
je 0x661be6
lea edx, [ebx + 0x24]
mov eax, ebx
call fcn.006615f0
test eax, eax
je 0x661be6
mov eax, dword [ebx + 0x38]
mov edx, dword [eax + 0x3c]
test edx, edx
je 0x661dc2
lea eax, [ebp - 0x10]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], ebx
call edx
sub eax, 1
setne al
test al, al
jne 0x661db1
movzx edi, byte [ebp - 0x10]
mov eax, edi
and eax, 0x40
mov dword [ebx + 0x28], eax
cmp byte [ebp - 0x10], 0
js 0x661def
mov eax, dword [ebx + 0x2c]
test eax, eax
je 0x661c76
mov dword [esp], eax
call fcn.006625f0
mov dword [ebx + 0x2c], 0
mov edx, dword [ebx + 0x30]
test edx, edx
je 0x661eca
mov eax, dword [ebx + 0x14]
mov dword [esp], edx
add eax, 1
lea eax, [eax + eax*4]
shl eax, 3
mov dword [esp + 4], eax
call sub.msvcrt.dll_realloc
test eax, eax
mov dword [ebx + 0x30], eax
je 0x661ee1
mov eax, dword [ebx + 0x14]
lea eax, [eax + eax*4]
lea edi, [eax*8]
mov eax, dword [ebx + 0x18]
add edi, dword [ebx + 0x30]
mov dword [edi], eax
mov edx, dword [ebp - 0x24]
mov eax, dword [edx + 4]
mov dword [edi + 4], eax
mov eax, dword [edx + 8]
mov dword [edi + 8], eax
mov eax, dword [edx + 0xc]
mov dword [edi + 0xc], eax
mov eax, dword [edx + 0x10]
mov dword [edi + 0x10], eax
mov eax, dword [edx + 0x14]
mov dword [edi + 0x14], eax
mov edx, dword [ebx + 0x2c]
test edx, edx
je 0x661cf5
mov eax, dword [edx + 8]
mov dword [esp + 4], eax
mov eax, dword [edx]
mov dword [esp], eax
call fcn.00662750
mov dword [edi + 0x14], eax
mov dword [edi + 0x20], 0
mov eax, dword [ebx + 0x24]
imul eax, dword [ebx + 0x20]
add dword [ebx + 0x14], 1
mov dword [edi + 0x18], 0
mov dword [esi + 0x34], eax
mov esi, dword [ebx + 0x38]
mov dword [edi + 0x24], 0
mov edx, dword [esi + 0x3c]
test edx, edx
je 0x661ef0
lea eax, [ebp - 0xd]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov dword [esp], ebx
call edx
movzx ecx, byte [ebp - 0xd]
mov ebx, 1
mov eax, ebx
mov byte [esi + 0x44], 0
mov dword [esi + 0x28], 0
shl eax, cl
mov dword [esi + 8], ecx
add ecx, 1
lea edx, [eax + 1]
mov dword [esi + 0xc], eax
shl ebx, cl
add eax, 2
mov dword [esi + 0x14], eax
mov eax, 1
mov dword [esi + 0x10], edx
mov dword [esi + 0x18], ecx
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x20], 0x1002
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 0
mov dword [esi + 0x2144], 0x1002
mov dword [esi + eax*4 + 0x2144], 0x1002
add eax, 1
cmp eax, 0x1000
jne 0x661d93
mov ax, 1
jmp 0x661bc6
xor eax, eax
mov dword [0xc1f620], 0x66
jmp 0x661bc6
mov eax, dword [eax + 0x38]
lea edx, [ebp - 0x10]
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov dword [esp], edx
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fread
sub eax, 1
setne al
jmp 0x661c42
mov eax, dword [ebx + 0x2c]
test eax, eax
je 0x661e01
mov ecx, dword [ebx + 0x30]
test ecx, ecx
je 0x661f17
and edi, 7
mov eax, 1
lea ecx, [edi + 1]
shl eax, cl
mov dword [esp + 4], 0
mov dword [esp], eax
call fcn.00662750
mov edx, dword [eax]
mov dword [ebx + 0x2c], eax
test edx, edx
jle 0x661c76
xor edi, edi
mov dword [ebp - 0x20], 0
jmp 0x661e96
lea eax, [ebp - 0x10]
mov dword [esp + 8], 3
mov dword [esp + 4], eax
mov dword [esp], ebx
call edx
cmp eax, 3
setne al
test al, al
jne 0x661db1
mov eax, dword [ebx + 0x2c]
mov edx, dword [eax + 8]
movzx eax, byte [ebp - 0x10]
mov byte [edx + edi], al
mov eax, dword [ebx + 0x2c]
mov edx, dword [eax + 8]
movzx eax, byte [ebp - 0xf]
mov byte [edx + edi + 1], al
mov eax, dword [ebx + 0x2c]
mov edx, dword [eax + 8]
movzx eax, byte [ebp - 0xe]
mov byte [edx + edi + 2], al
mov eax, dword [ebx + 0x2c]
add edi, 3
add dword [ebp - 0x20], 1
mov edx, dword [ebp - 0x20]
cmp dword [eax], edx
jle 0x661c76
mov eax, dword [ebx + 0x38]
mov edx, dword [eax + 0x3c]
test edx, edx
jne 0x661e36
mov eax, dword [eax + 0x38]
lea edx, [ebp - 0x10]
mov dword [esp + 8], 3
mov dword [esp + 4], 1
mov dword [esp], edx
mov dword [esp + 0xc], eax
call sub.msvcrt.dll_fread
cmp eax, 3
setne al
jmp 0x661e50
mov dword [esp], 0x28
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [ebx + 0x30], eax
jne 0x661ca4
mov dword [0xc1f620], 0x6d
jmp 0x661bc6
mov eax, dword [esi + 0x38]
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov dword [esp + 0xc], eax
lea eax, [ebp - 0xd]
mov dword [esp], eax
call sub.msvcrt.dll_fread
jmp 0x661d3a
mov dword [esp], eax
call fcn.006625f0
nop
jmp 0x661e01