Function at 0x10050550
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10055e82
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x10060008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
xor eax, eax
xor edi, edi
xorps xmm0, xmm0
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], edi
mov word [ebp - 0x1c], ax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
movq qword [ebp - 0x38], xmm0
mov dword [ebp - 0x30], eax
mov word [ebp - 0x2c], ax
mov byte [ebp - 0x2a], al
push eax
push eax
mov dword [ebp - 4], eax
push eax
push dword [esi + 0x50]
mov dword [ebp - 0x40], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x40]
push edi
push eax
push 0x28
push esi
push dword [esi + 0x50]
call ebx
test eax, eax
je 0x10050790
cmp dword [ebp - 0x40], 0x28
jne 0x10050790
cmp dword [esi], 3
je 0x100505ec
mov edi, 0xd
jmp 0x10050795
push 0
lea eax, [ebp - 0x40]
mov dword [ebp - 0x44], 0
push eax
push 4
lea eax, [ebp - 0x44]
push eax
push dword [esi + 0x50]
call ebx
test eax, eax
je 0x10050790
cmp dword [ebp - 0x40], 4
jne 0x10050790
xor ebx, ebx
cmp dword [ebp - 0x44], ebx
jbe 0x10050795
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x40]
push 0
push eax
push 0x21
lea eax, [ebp - 0x3c]
push eax
push dword [esi + 0x50]
call edi
test eax, eax
je 0x10050790
cmp dword [ebp - 0x40], 0x21
jne 0x10050790
movzx eax, word [ebp - 0x1c]
push eax
call fcn.10007b55
add esp, 4
mov ecx, eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0x48], ecx
push 0
push eax
movzx eax, word [ebp - 0x1c]
push eax
push ecx
push dword [esi + 0x50]
call edi
test eax, eax
je 0x10050790
movzx edi, word [ebp - 0x1c]
cmp dword [ebp - 0x40], edi
jne 0x10050790
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x10050699
push eax
call fcn.10007a2e
add esp, 4
mov dword [ebp - 0x18], 0
push edi
call fcn.10007b55
push edi
push 0
push eax
mov dword [ebp - 0x18], eax
call sub.VCRUNTIME140.dll_memset
lea eax, [edi*8]
push edi
mov edi, dword [ebp - 0x48]
push edi
push dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
call sub.VCRUNTIME140.dll_memcpy
push edi
call fcn.10007a2e
mov eax, dword [esi + 0x48]
add esp, 0x20
inc eax
mov ecx, esi
push eax
call fcn.10050060
mov edx, dword [esi + 0x4c]
test edx, edx
je 0x10050782
mov eax, dword [esi + 0x48]
lea ecx, [eax - 1]
cmp ecx, eax
jae 0x10050782
imul ecx, ecx, 0x2c
lea eax, [ebp - 0x3c]
push eax
add ecx, edx
call fcn.100509a0
mov eax, dword [ebp - 0x24]
cmp eax, dword [esi + 0xc4]
jbe 0x10050740
mov ecx, dword [esi + 0xb8]
test ecx, ecx
je 0x1005073a
push ecx
call fcn.10007a2e
push dword [esi + 0xc4]
mov dword [esi + 0xb8], 0
call fcn.10007b55
mov dword [esi + 0xb8], eax
add esp, 8
mov eax, dword [ebp - 0x24]
mov dword [esi + 0xc4], eax
mov eax, dword [ebp - 0x20]
cmp eax, dword [esi + 0xc0]
jbe 0x10050782
mov ecx, dword [esi + 0xbc]
test ecx, ecx
je 0x1005077c
push ecx
call fcn.10007a2e
push dword [esi + 0xc0]
mov dword [esi + 0xbc], 0
call fcn.10007b55
mov dword [esi + 0xbc], eax
add esp, 8
mov eax, dword [ebp - 0x20]
mov dword [esi + 0xc0], eax
inc ebx
cmp ebx, dword [ebp - 0x44]
jb 0x10050621
xor edi, edi
jmp 0x10050795
mov edi, 1
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x100507a5
push ecx
call fcn.10007a2e
add esp, 4
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100076a5
mov esp, ebp
pop ebp
ret