Function at 0x555820
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xc0
mov esi, ecx
mov ebx, dword [ebp + 0xc]
mov eax, dword [0x644040]
xor eax, ebp
mov dword [esp + 0xb8], eax
pcmpeqd xmm0, xmm0
lea edi, [esp + 0x70]
movdqa xmmword [edi + 0x20], xmm0
movdqa xmmword [edi + 0x10], xmm0
movdqa xmmword [edi], xmm0
lea eax, [esp + 0x50]
push 0x42
push str.file_win.cc
push str.Read
push eax
call fcn.005068d0
add esp, 0x10
xor eax, eax
mov ecx, edi
push eax
push eax
call fcn.00520200
mov dword [esp + 0xa4], 0xa
mov al, byte [0x649446]
test al, al
jne 0x555df9
xor ecx, ecx
dec ecx
test ebx, ebx
js 0x5558f6
mov eax, dword [ebp + 0x14]
test eax, eax
js 0x5558f6
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0x10]
pxor xmm0, xmm0
movdqa xmmword [esp + 0x50], xmm0
mov dword [esp + 0x60], 0
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x58], ecx
lea ecx, [esp + 0xa8]
mov dword [ecx], 0xffffffff
lea edi, [esp + 0x50]
push edi
push ecx
push eax
push edx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x555b90
mov ecx, dword [esp + 0xa8]
test ecx, ecx
js 0x555dc9
mov dword [esp + 0x1c], ecx
mov dword [esp + 0xa8], 0xa
mov al, byte [0x649446]
test al, al
jne 0x555dd1
call fcn.00564ed5
mov edi, dword [eax]
call fcn.00564ed5
xor ebx, ebx
mov dword [eax], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, dword [esp + 0x70]
test ebx, ebx
je 0x5559a4
cmp dword [esp + 0x74], 0
jne 0x5559a4
cmp byte [ebx + 0x11], 0
je 0x5559a4
mov eax, dword [ebx + 0x20]
add eax, 0x50
mov dword [esp + 0xc], eax
push eax
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x555b4c
xor eax, eax
mov dword [ebx + 0x1c], eax
mov dword [ebx + 0x18], eax
cmp byte [ebx + 0x2b], 0
jne 0x555994
cmp byte [ebx + 0x29], 0
mov eax, dword [ebx + 0x20]
jne 0x555b5b
dec dword [eax + 0xb4]
cmp byte [ebx + 0x11], 0
je 0x555e2c
cmp byte [ebx + 0x10], 0
je 0x555a40
mov word [ebx + 0x29], 0
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.00564ed5
mov dword [eax], edi
cmp byte [esp + 0x98], 0
je 0x5559cb
mov eax, dword [esp + 0x90]
test eax, eax
jne 0x555a58
mov eax, dword [esp + 0x78]
test eax, eax
je 0x5559d9
mov ecx, dword [esp + 0x7c]
mov dword [eax], ecx
mov eax, dword [esp + 0x74]
mov ecx, eax
shr ecx, 0xe
mov edx, eax
shr edx, 0x13
mov edx, dword [edx*4 + 0x64c804]
bt edx, ecx
jb 0x555d87
mov dword [esp + 0x74], 0
mov eax, dword [esp + 0x70]
mov ecx, eax
shr ecx, 0xe
mov edx, eax
shr edx, 0x13
mov edx, dword [edx*4 + 0x64c804]
bt edx, ecx
jb 0x555a35
mov ecx, dword [esp + 0xb8]
xor ecx, ebp
call fcn.00568175
mov eax, dword [esp + 0x1c]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 0x10
push eax
call fcn.004f0f10
add esp, 4
jmp 0x555a19
cmp byte [ebx + 0x2a], 0
mov eax, dword [ebx + 0x20]
jne 0x555d95
dec dword [eax + 0xb8]
jmp 0x555994
mov dword [esp + 0xc], eax
mov ecx, dword [fcn.005515a0]
cmp ecx, 0x522100
jne 0x555b32
xor eax, eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x50], eax
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov esi, dword [esp + 0x50]
mov edi, dword [esp + 0x54]
mov eax, 0x7bd05af6
cmp eax, esi
mov eax, 0x863
sbb eax, edi
jl 0x555e50
mov ecx, 0xf4240
mov eax, esi
mul ecx
imul ecx, edi, 0xf4240
add ecx, edx
push dword [0x6496bc]
push dword [0x6496b8]
push ecx
push eax
call fcn.00588630
mov ecx, edx
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], ecx
mov edx, dword [esp + 0x88]
mov esi, dword [esp + 0x8c]
mov dword [esp + 4], eax
sub eax, edx
mov dword [esp + 8], ecx
sbb ecx, esi
seto bl
mov edi, ecx
sar edi, 0x1f
test bl, bl
cmovne eax, edi
add edi, 0x80000000
test bl, bl
cmove edi, ecx
cmp eax, 0xf4240
mov ecx, edi
sbb ecx, 0
jge 0x555ba5
mov esi, dword [esp + 0x90]
test esi, esi
je 0x5559cb
lock dec dword [esi]
jne 0x5559cb
jmp 0x555e3b
call dword [0x63e64c]
lea esi, [esp + 0xa8]
push esi
call ecx
add esp, 4
mov eax, dword [esi]
mov ecx, dword [esi + 4]
jmp 0x555ad3
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
jmp 0x55595f
mov ecx, dword [eax + 0x5c]
mov edx, dword [eax + 0xa4]
dec edx
mov dword [eax + 0xa4], edx
cmp ecx, dword [eax + 0x60]
je 0x555b78
cmp dword [eax + 0xac], edx
jae 0x555b83
mov word [eax + 0x78], 0
jmp 0x555980
movzx ecx, word [ecx + 8]
mov word [eax + 0x78], cx
jmp 0x555980
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 0x26
setne cl
neg ecx
jmp 0x5558f6
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], esi
xor eax, eax
dec eax
mov ebx, 0x3938700
mov esi, dword [esp + 0xc]
add ebx, dword [esi + 0xf8]
mov ecx, dword [esi + 0xfc]
adc ecx, 0
mov edx, 0x7fffffff
cmovno edx, ecx
cmovo ebx, eax
mov eax, dword [esp + 4]
cmp eax, ebx
mov ebx, dword [esp + 8]
mov ecx, ebx
sbb ecx, edx
jge 0x555f39
mov ecx, dword [esi + 0xf8]
mov eax, dword [esi + 0xfc]
mov esi, dword [esp + 0x18]
mov edx, esi
mov dword [esp + 8], ecx
sub edx, ecx
mov ebx, dword [esp + 0x10]
mov dword [esp + 4], eax
sbb ebx, eax
seto cl
mov eax, ebx
sar eax, 0x1f
test cl, cl
cmovne edx, eax
add eax, 0x80000000
test cl, cl
cmove eax, ebx
mov ecx, edx
add ecx, 1
mov ebx, eax
adc ebx, 0x80000000
cmp ecx, 2
sbb ebx, 0
jb 0x555f19
movd xmm0, edx
movd xmm1, eax
punpckldq xmm0, xmm1
movq qword [esp + 0x48], xmm0
fild qword [esp + 0x48]
fstp qword [esp + 0x40]
movsd xmm0, qword [esp + 0x40]
mov ebx, 0x80000000
xor esi, esi
inc esi
divsd xmm0, qword [0x62eae0]
sub esp, 8
movsd qword [esp], xmm0
call fcn.00591b10
add esp, 8
fstp qword [esp + 0x38]
movsd xmm0, qword [esp + 0x38]
movsd xmm1, qword [0x62f100]
ucomisd xmm1, xmm0
jb 0x555eeb
maxsd xmm0, qword [0x62f108]
cvttsd2si ecx, xmm0
mov eax, dword [esp + 0x14]
movd xmm0, eax
add esi, eax
adc ebx, edi
movd xmm1, edi
cmp esi, 2
sbb ebx, 0
punpckldq xmm0, xmm1
movq qword [esp + 0x30], xmm0
fild qword [esp + 0x30]
fstp qword [esp + 0x28]
mov ebx, ecx
jae 0x555cdb
movsd xmm0, qword [0x62f110]
jmp 0x555ce9
movsd xmm0, qword [esp + 0x28]
divsd xmm0, qword [0x62eae0]
sub esp, 8
movsd qword [esp], xmm0
call fcn.00591c0d
add esp, 8
fstp qword [esp + 0x20]
movsd xmm0, qword [esp + 0x20]
movsd xmm1, qword [0x62f100]
ucomisd xmm1, xmm0
jb 0x555f02
maxsd xmm0, qword [0x62f108]
cvttsd2si esi, xmm0
add esi, ebx
cmp esi, 0x3c
mov edi, 0x3c
cmovl edi, esi
mov eax, dword [esp + 0xc]
add eax, 4
mov dword [esp + 4], eax
push eax
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x555edc
cmp ebx, edi
mov eax, dword [esp + 0xc]
jge 0x555d59
inc dword [eax + ebx*4 + 8]
inc ebx
cmp edi, ebx
jne 0x555d50
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp esi, 0x3d
jl 0x555b15
mov eax, dword [esp + 0xc]
mov eax, dword [eax + 0x100]
sub esi, edi
xor ebx, ebx
mov dword [esp + 0xc], eax
test eax, eax
jne 0x555d21
jmp 0x555b15
push eax
call fcn.004f0f10
add esp, 4
jmp 0x5559f7
dec dword [eax + 0xa8]
mov ecx, dword [eax + 0x5c]
cmp ecx, dword [eax + 0x60]
je 0x555db1
mov edx, dword [eax + 0xac]
cmp edx, dword [eax + 0xa4]
jae 0x555dbc
mov word [eax + 0x78], 0
jmp 0x555994
movzx ecx, word [ecx + 8]
mov word [eax + 0x78], cx
jmp 0x555994
int3
movzx eax, al
mov dword [esp + 0x50], 0
lea ecx, [esp + 0xa8]
push 2
lea edx, [esp + 0x54]
push edx
push ecx
push eax
call fcn.0059d990
add esp, 0x10
jmp 0x555912
movzx ecx, al
lea eax, [esp + 0xa8]
lea edx, [esp + 0x50]
mov dword [eax], edx
lea edi, [esp + 0xb4]
mov dword [edi], str.ScopedBlockingCall
lea edx, [esp + 0xa4]
push eax
push edi
call fcn.005b8bd0
add esp, 8
jmp 0x555894
push str....._third_partylibc_srcincludeoptional:801:_assertion_this__has_value___failed:_optional_operator_called_on_a_disengaged_value_n
push 0x624173
call fcn.00591ed0
mov ecx, esi
call fcn.004ed960
push esi
call fcn.00564ea0
add esp, 4
jmp 0x5559cb
mov ebx, dword [0x6496b8]
mov dword [esp + 0x18], ebx
mov eax, dword [0x6496bc]
mov dword [esp + 4], eax
push eax
push ebx
push edi
push esi
call fcn.00588630
mov dword [esp + 8], eax
mov ecx, edx
mov eax, dword [esp + 8]
mul ebx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 8]
mov ebx, eax
imul ebx, dword [esp + 4]
add edx, ebx
imul ebx, ecx, 0xf4240
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x18]
imul ecx, ebx
add ecx, edx
sub esi, dword [esp + 0x14]
sbb edi, ecx
mov ecx, 0xf4240
mul ecx
mov dword [esp + 8], eax
add edx, dword [esp + 0x10]
mov dword [esp + 0x10], edx
mov eax, esi
mul ecx
imul ecx, edi, 0xf4240
add edx, ecx
push dword [esp + 4]
push ebx
push edx
push eax
call fcn.00588630
mov ecx, edx
add eax, dword [esp + 8]
adc ecx, dword [esp + 0x10]
jmp 0x555ac5
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
jmp 0x555d48
xor eax, eax
ucomisd xmm0, qword [0x62f108]
mov ecx, 0x7fffffff
cmovb ecx, eax
jmp 0x555ca5
xor eax, eax
ucomisd xmm0, qword [0x62f108]
mov esi, 0x7fffffff
cmovb esi, eax
jmp 0x555d21
cmp esi, dword [esp + 8]
mov eax, dword [esp + 0x10]
sbb eax, dword [esp + 4]
setl al
movzx eax, al
movsd xmm0, qword [eax*8 + 0x62f0f0]
jmp 0x555c5d
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], ebx
sub esp, 0xc
movq xmm0, qword [esp + 0x5c]
movq qword [esp + 4], xmm0
lea ebx, [esp + 0xc0]
mov dword [esp], ebx
call fcn.004ed880
add esp, 0xc
mov ebx, dword [ebx]
test ebx, ebx
je 0x555beb
lock dec dword [ebx]
jne 0x555beb
mov ecx, ebx
call fcn.004ed960
push ebx
call fcn.00564ea0
add esp, 4
jmp 0x555beb