Function at 0x51f6c0
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebx
push esi
mov esi, dword [esp + 0x10]
xor eax, eax
push edi
mov edi, dword [esp + 0x18]
cmp dword [esi + 0x1b8], 7
sete al
push eax
push dword [esi + 0x1e0]
push 1
push 0
push 0
push 0
push edi
push esi
call fcn.00519010
mov ebx, eax
add esp, 0x20
mov dword [esp + 0xc], ebx
test ebx, ebx
je 0x51f9f1
mov eax, dword [ebx + 4]
test eax, eax
je 0x51f731
push 2
push 0
push eax
call fcn.004e66e5
push dword [ebx + 4]
call fcn.004e6d44
push 0
push 0
push dword [ebx + 4]
mov dword [esp + 0x30], eax
call fcn.004e66e5
mov eax, dword [esp + 0x30]
add esp, 0x1c
jmp 0x51f738
mov eax, dword [ebx + 0x2c]
mov dword [esp + 0x14], eax
cmp eax, 0x1000000
jbe 0x51f752
push edi
push 0x1b
push 0x46
push esi
call fcn.0051ae70
add esp, 0x10
jmp 0x51f9df
cmp dword [esi + 0x1ac], 0
jne 0x51f768
cmp dword [esi + 0x1b0], 0
je 0x51f9df
mov ecx, dword [esi + 0x1b4]
push ebp
xor ebp, ebp
test ecx, ecx
jne 0x51f786
call fcn.00518f70
mov ecx, eax
mov eax, dword [esp + 0x18]
mov dword [esi + 0x1b4], ecx
test eax, eax
je 0x51f813
cmp dword [ebx + 4], ebp
jne 0x51f7ab
cmp dword [esi + 0x1b8], 5
je 0x51f7ab
push eax
push dword [ebx + 0x28]
push ecx
call fcn.00518eb0
add esp, 0xc
jmp 0x51f813
push eax
call fcn.00470460
mov edi, eax
add esp, 4
mov eax, dword [ebx + 4]
test eax, eax
je 0x51f7d3
push eax
push dword [esp + 0x1c]
push 1
push edi
call fcn.004e6342
add esp, 0x10
mov dword [esp + 0x18], eax
jmp 0x51f7e3
push dword [esp + 0x18]
push dword [ebx + 0x28]
push edi
call fcn.004dbc20
add esp, 0xc
cmp dword [esi + 0x1b8], 5
jne 0x51f7fa
lea eax, [esp + 0x18]
push eax
push edi
call fcn.004c8bf0
add esp, 8
push dword [esp + 0x18]
push edi
push dword [esi + 0x1b4]
call fcn.00518eb0
push edi
call fcn.00470430
add esp, 0x10
mov ecx, dword [esi + 0x1d4]
add ecx, 8
mov dword [esi + 0x124], ecx
mov edx, dword [ecx]
test edx, edx
je 0x51f876
mov eax, ecx
mov ebx, 0xff
nop
mov edi, eax
mov eax, edx
mov ecx, edi
mov dx, word [eax + 0x14]
and dx, bx
cmp dx, 0x1f
je 0x51f872
cmp dx, 0x1e
jne 0x51f864
mov ecx, dword [eax]
test ecx, ecx
je 0x51f864
mov dx, word [ecx + 0x14]
mov ecx, edi
and dx, bx
cmp dx, 0x20
je 0x51f872
cmp dx, 0x21
je 0x51f872
mov dword [esi + 0x124], eax
mov ecx, eax
mov edx, dword [eax]
test edx, edx
jne 0x51f830
mov ebx, dword [esp + 0x10]
mov edi, dword [ecx]
test edi, edi
jne 0x51f8aa
push 0x401f
push edi
push 1
push 0x65b2d8
call fcn.00522c80
mov ecx, dword [esi + 0x124]
add esp, 0x10
mov dword [ecx], eax
mov dword [esi + 0x124], eax
mov eax, dword [esi + 0x1d4]
inc dword [eax + 0x18]
jmp 0x51f907
movzx eax, word [edi + 0x14]
mov edx, eax
cmp al, 0x1f
jne 0x51f907
mov ecx, edx
test edx, 0x4000
jne 0x51f8cd
push dword [edi + 8]
call fcn.00470430
movzx ecx, word [edi + 0x14]
add esp, 4
mov eax, dword [0x6ebc34]
or ecx, 0x4000
mov dword [edi + 8], eax
mov edx, 0xff1e
mov word [edi + 0x14], cx
mov ebp, 1
mov dword [edi + 0xc], 1
mov eax, dword [esi + 0x124]
mov ecx, dword [eax]
mov ax, word [ecx + 0x14]
and ax, dx
or ax, 0x1e
mov word [ecx + 0x14], ax
mov eax, dword [esi + 0x124]
mov ecx, dword [esi + 0x1ac]
mov eax, dword [eax]
mov dword [esi + 0x124], eax
mov edi, dword [eax]
test ecx, ecx
je 0x51f936
mov eax, dword [esi + 0x1b4]
push dword [eax + 4]
push dword [eax]
push ecx
push esi
call fcn.00522080
add esp, 0x10
mov ecx, dword [esi + 0x1b0]
test ecx, ecx
je 0x51f96d
cmp dword [esi + 0x1ac], 0
je 0x51f958
push esi
call fcn.00521df0
mov ecx, dword [esi + 0x1b0]
add esp, 4
mov eax, dword [esi + 0x1b4]
push dword [eax + 4]
push dword [eax]
push ecx
push esi
call fcn.00522080
add esp, 0x10
test ebp, ebp
pop ebp
je 0x51f991
push 0x401f
push 0
push 1
push 0x65b2d8
call fcn.00522c80
mov ecx, dword [esi + 0x124]
mov edx, eax
mov dword [ecx], edx
jmp 0x51f9ae
push 0x401e
push 0
push 1
push 0x6ec068
call fcn.00522c80
mov edx, eax
mov eax, dword [esi + 0x124]
mov dword [eax], edx
mov dword [esi + 0x124], edx
add esp, 0x10
mov eax, dword [esi + 0x1d4]
inc dword [eax + 0x18]
mov eax, dword [esi + 0x124]
mov dword [esi + 0x1a8], 1
mov dword [eax], edi
mov eax, dword [esi + 0x1b4]
mov dword [eax + 4], 0
push dword [esi + 0x1e4]
push ebx
push esi
call fcn.00518fa0
add esp, 0xc
jmp 0x51f9ff
push edi
push 0x1d
push 0x46
push esi
call fcn.0051ae70
add esp, 0x10
lea eax, [esi + 0x1ac]
push eax
call fcn.005226a0
lea eax, [esi + 0x1b0]
push eax
call fcn.005226a0
add esp, 8
pop edi
pop esi
pop ebx
pop ecx
ret