Function at 0x4010b0
Capabilities:
Read file on windows
Read pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov ecx, dword [0x416c00]
push 0
lea eax, [ebp - 4]
push eax
push 0
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
mov eax, dword [ebp - 4]
test eax, eax
je 0x40160e
push esi
push edi
lea edi, [eax + 1]
push edi
call fcn.00405000
mov esi, eax
add esp, 4
test esi, esi
je 0x4010fc
push edi
push 0
push esi
call fcn.0040c0f0
add esp, 0xc
jmp 0x4010fe
xor esi, esi
mov eax, dword [ebp - 4]
mov ecx, dword [0x416c00]
push 0
lea edx, [ebp - 0x18]
push edx
push eax
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [0x419120], 1
jne 0x401145
push 0x413214
push str.log.txt
call fcn.00404dad
push esi
mov edi, eax
push 0x413220
push edi
call fcn.00404dc4
push edi
call fcn.00404f3d
add esp, 0x18
push ebx
push str.bestmove
push esi
call fcn.00405080
push str.ponder
push esi
mov ebx, eax
call fcn.00405080
mov edi, 1
add esp, 0x10
mov dword [ebp - 0x14], eax
cmp dword [ebp - 4], edi
jbe 0x40118b
mov edi, edi
lea edx, [edi + esi]
push str.score_cp
push edx
call fcn.00405080
add esp, 8
test eax, eax
je 0x40118b
inc edi
cmp edi, dword [ebp - 4]
jb 0x401170
lea edi, [edi + esi - 1]
push str.score_cp
push edi
call fcn.00405080
push str.score_mate
push esi
mov dword [ebp - 8], eax
call fcn.00405080
push str.nps
push edi
mov dword [ebp - 0xc], eax
call fcn.00405080
mov edi, 1
add esp, 0x18
mov dword [ebp - 0x10], eax
cmp dword [ebp - 4], edi
jbe 0x4011e1
lea eax, [edi + esi]
push str.depth
push eax
call fcn.00405080
add esp, 8
test eax, eax
je 0x4011e1
inc edi
cmp edi, dword [ebp - 4]
jb 0x4011c6
lea ecx, [edi + esi - 1]
push str.depth
push ecx
call fcn.00405080
add esp, 8
xor edi, edi
cmp dword [0x419130], 1
mov esi, eax
jne 0x401265
mov eax, dword [ebp - 8]
cmp eax, edi
je 0x40121a
push 0x419144
push str.score_cp__d
push eax
call fcn.00405174
add esp, 0xc
mov eax, dword [ebp - 0xc]
cmp eax, edi
je 0x401234
push 0x419144
push str.score_mate__d
push eax
call fcn.00405174
add esp, 0xc
cmp esi, edi
je 0x40124b
push 0x419140
push str.depth__d
push esi
call fcn.00405174
add esp, 0xc
mov eax, dword [ebp - 0x10]
cmp eax, edi
je 0x401265
push 0x41913c
push str.nps__d
push eax
call fcn.00405174
add esp, 0xc
cmp ebx, edi
je 0x401608
mov eax, dword [0x41912c]
mov ecx, 1
cmp eax, ecx
je 0x401283
cmp dword [0x419130], edi
jne 0x401289
mov dword [0x419128], edi
cmp eax, edi
jne 0x401608
cmp dword [0x419130], ecx
jne 0x401608
mov eax, dword [0x416c0c]
mov edx, dword [0x419124]
add dword [0x419170], edx
push ecx
push edi
push eax
mov dword [0x4190fc], edi
mov dword [0x4190f8], ecx
mov dword [0x419130], edi
mov dword [0x4190f4], ecx
call dword [sym.imp.USER32.dll_InvalidateRect]
movzx ecx, byte [ebx + 0xb]
mov al, byte [ebx + 9]
mov dl, byte [ebx + 0xa]
mov esi, dword [ebp - 0x14]
mov byte [0x4190ef], cl
movzx ecx, byte [ebx + 0xc]
mov byte [0x4190ee], cl
movzx ecx, byte [ebx + 0xd]
mov bl, 0x39
mov byte [0x4190f1], al
mov byte [0x4190f0], dl
mov byte [0x4190ed], cl
mov byte [0x4190eb], bl
cmp esi, edi
je 0x40133e
movzx ecx, byte [esi + 7]
mov bl, byte [esi + 8]
mov byte [0x4190ec], cl
movzx ecx, byte [esi + 9]
mov byte [0x4190ea], cl
movzx ecx, byte [esi + 0xa]
mov byte [0x4190e9], cl
movzx ecx, byte [esi + 0xb]
mov byte [0x4190eb], bl
mov byte [0x4190e8], cl
mov ecx, dword [0x419138]
cmp ecx, 1
jne 0x40138a
movsx edx, dl
movsx ecx, al
movsx eax, byte [0x4190ef]
mov esi, 0x38
sub esi, edx
movsx edx, byte [0x4190ee]
sub ecx, 0x61
sub eax, 0x61
mov edi, 0x38
sub edi, edx
mov dword [0x41915c], ecx
mov dword [0x419158], esi
mov dword [0x419154], eax
mov dword [0x419150], edi
jmp 0x4013e6
cmp ecx, edi
jne 0x4013cf
movsx edi, byte [0x4190ee]
movsx eax, al
movsx esi, dl
movsx edx, byte [0x4190ef]
mov ecx, 0x68
sub ecx, eax
mov eax, 0x68
sub esi, 0x31
sub eax, edx
sub edi, 0x31
mov dword [0x41915c], ecx
mov dword [0x419158], esi
mov dword [0x419154], eax
mov dword [0x419150], edi
jmp 0x4013e6
mov ecx, dword [0x41915c]
mov esi, dword [0x419158]
mov eax, dword [0x419154]
mov edi, dword [0x419150]
movsx edx, bl
sub edx, 0x30
mov dword [0x41914c], edx
movsx edx, byte [0x4190e9]
sub edx, 0x30
mov dword [0x419148], edx
lea edx, [ecx + esi*8]
add edx, edx
add edx, edx
mov ebx, 6
cmp dword [edx + 0x419178], ebx
jne 0x401454
lea esi, [ecx - 2]
cmp eax, esi
jne 0x401431
mov dword [0x419258], 0
mov dword [edx + 0x419174], 5
cmp dword [edx + 0x419178], ebx
jne 0x401454
lea esi, [ecx + 2]
cmp eax, esi
jne 0x401454
mov dword [0x419274], 0
mov dword [edx + 0x41917c], 5
cmp dword [edx + 0x419178], 4
jne 0x40148a
lea esi, [eax + edi*8]
add esi, esi
add esi, esi
cmp dword [esi + 0x419178], 0
jne 0x40148a
lea ebx, [eax - 1]
cmp ecx, ebx
je 0x40147b
lea ebx, [eax + 1]
cmp ecx, ebx
jne 0x401485
mov dword [esi + 0x419198], 0
mov ebx, 6
mov esi, 4
cmp dword [edx + 0x419178], esi
jne 0x4014a5
test edi, edi
je 0x4014a5
lea ecx, [eax + edi*8]
mov dword [ecx*4 + 0x419178], esi
cmp dword [edx + 0x419178], ebx
jne 0x4014b7
lea ecx, [eax + edi*8]
mov dword [ecx*4 + 0x419178], ebx
lea eax, [eax + edi*8]
mov dword [edx + 0x419178], 0
mov ecx, dword [eax*4 + 0x419178]
cmp ecx, esi
je 0x4014de
cmp ecx, ebx
je 0x4014de
mov dword [eax*4 + 0x419178], 5
movsx edx, byte [0x4190ee]
movsx eax, byte [0x4190ef]
movsx ecx, byte [0x4190f0]
push edx
movsx edx, byte [0x4190f1]
push eax
push ecx
push edx
push 0x4180e8
push str._s__c_c_c_c
push 0x4180e8
call fcn.00405196
mov al, byte [0x4190ed]
add esp, 0x1c
cmp al, 0x71
je 0x40152a
cmp al, 0x72
je 0x40152a
cmp al, 0x62
je 0x40152a
cmp al, 0x6e
jne 0x40154d
push 0x41329c
push 0x4180e8
push str._s_s
push 0x4180e8
mov byte [0x4190ed], 0x71
call fcn.00405196
add esp, 0x10
cmp dword [0x419134], 0
je 0x401608
mov eax, dword [0x41914c]
dec eax
cmp eax, 7
ja 0x401608
push 0x1000
push 0
push 0x4170e8
call fcn.0040c0f0
movsx ecx, byte [0x4190e9]
movsx edx, byte [0x4190ea]
movsx eax, byte [0x4190eb]
push ecx
movsx ecx, byte [0x4190ec]
push edx
push eax
push ecx
push 0x4180e8
push str._s__c_c_c_c
push 0x4170e8
call fcn.00405196
mov al, byte [0x4190e8]
add esp, 0x28
cmp al, 0x71
je 0x4015c6
cmp al, 0x72
je 0x4015c6
cmp al, 0x62
je 0x4015c6
cmp al, 0x6e
jne 0x4015e2
push 0x41329c
push 0x4170e8
push str._s_s
push 0x4170e8
call fcn.00405196
add esp, 0x10
push 0x4170e8
push str.position_startpos_moves_s
call fcn.00401000
push str.go_infinite
call fcn.00401000
add esp, 0xc
mov dword [0x419128], 1
mov eax, dword [ebp - 4]
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret