Function at 0x10051aae
Capabilities:
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x1860]
mov eax, 0x18e0
call fcn.1009e220
mov eax, dword [0x1012a750]
xor eax, ebp
mov dword [ebp + 0x185c], eax
push ebx
mov ebx, dword [ebp + 0x1868]
push esi
push 0x100e0a4c
push ebx
mov esi, ecx
call fcn.1009e0f6
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x60], eax
jne 0x10051afc
and dword [esi + 0x1898], eax
mov byte [esi + 0x189c], al
jmp 0x10051d00
push edi
push eax
mov edi, 0x1898
push edi
push 1
push esi
call fcn.1009e017
add esp, 0x10
cmp eax, edi
je 0x10051b2e
push dword [ebp - 0x60]
mov byte [esi + 0x189c], 0
call fcn.1009dcc5
and dword [esi + 0x1898], 0
jmp 0x10051cfe
push str.Adaptec_Target_Flash_Image
push esi
call fcn.10099eb0
test eax, eax
pop ecx
pop ecx
jne 0x10051b13
mov edi, dword [esi + 0x5c]
mov eax, dword [esi + 0x50]
push dword [esi + 0x54]
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], eax
call fcn.1000ea8c
cmp edi, 1
pop ecx
mov dword [esi + 0x1898], eax
jle 0x10051d1b
and dword [ebp - 0x70], 0
mov edi, 0x1894
push edi
push esi
push eax
mov dword [ebp - 0x6c], eax
call fcn.10099130
add dword [ebp - 0x6c], edi
lea eax, [ebp + 0x1848]
push ebx
push eax
call fcn.1009a280
lea eax, [ebp + 0x1848]
push 0x2e
push eax
call fcn.1009eb20
and dword [ebp - 0x64], 0
mov ebx, eax
lea eax, [ebp + 0x1848]
add esp, 0x1c
sub ebx, eax
cmp dword [ebp - 0x78], 0
jle 0x10051ca9
mov eax, dword [ebp - 0x64]
inc eax
push eax
mov dword [ebp - 0x80], eax
lea eax, [ebp + 0x183c]
push 0x100d0720
push eax
call fcn.100995c4
add esp, 0xc
cmp dword [ebp - 0x64], 0xa
lea eax, [ebp + 0x183c]
jge 0x10051be4
push 1
push eax
lea eax, [ebp + ebx + 0x1847]
jmp 0x10051bee
push 2
push eax
lea eax, [ebp + ebx + 0x1846]
push eax
call fcn.10099130
add esp, 0xc
lea eax, [ebp + 0x1848]
push 0x100e0a4c
push eax
call fcn.1009e0f6
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x68], eax
je 0x10051b13
and dword [ebp - 0x64], 0
push eax
push edi
lea eax, [ebp - 0x5c]
push 1
push eax
call fcn.1009e017
push dword [ebp - 0x68]
mov dword [ebp - 0x74], eax
call fcn.1009dd70
add esp, 0x14
test eax, eax
jne 0x10051ca9
push eax
push dword [ebp - 0x74]
push dword [ebp - 0x68]
call fcn.1009f537
push dword [ebp - 0x68]
call fcn.1009dd41
add esp, 0x10
jmp 0x10051c87
push dword [ebp - 0x68]
push 0x3e8
push 1
push dword [ebp - 0x6c]
call fcn.1009e017
push dword [ebp - 0x68]
mov dword [ebp - 0x74], eax
call fcn.1009dd70
add esp, 0x14
test eax, eax
jne 0x10051c8b
mov eax, dword [ebp - 0x74]
push dword [ebp - 0x68]
add dword [ebp - 0x6c], eax
add dword [ebp - 0x64], eax
call fcn.1009dd41
pop ecx
test eax, eax
je 0x10051c51
mov eax, dword [ebp - 0x64]
push dword [ebp - 0x68]
add dword [ebp - 0x70], eax
call fcn.1009dcc5
mov eax, dword [ebp - 0x80]
cmp eax, dword [ebp - 0x78]
pop ecx
mov dword [ebp - 0x64], eax
jl 0x10051bb0
mov eax, dword [ebp - 0x70]
add eax, 0x1894
mov ecx, dword [esi + 0x54]
cmp eax, ecx
jne 0x10051b13
mov eax, dword [esi + 0x1898]
xor ebx, ebx
xor edx, edx
test ecx, ecx
jle 0x10051cdd
movzx edi, byte [eax + edx]
add edi, ebx
and edi, 0xffff
inc edx
cmp edx, ecx
mov ebx, edi
jl 0x10051cca
cmp ebx, dword [esi + 0x4c]
je 0x10051cef
mov eax, dword [ebp - 0x7c]
not eax
cmp ebx, eax
jne 0x10051b13
push dword [ebp - 0x60]
mov byte [esi + 0x189c], 1
call fcn.1009dcc5
pop ecx
pop edi
mov ecx, dword [ebp + 0x185c]
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.10098e68
add ebp, 0x1860
leave
ret 4
push dword [ebp - 0x60]
call fcn.1009f97f
push dword [ebp - 0x60]
push dword [esi + 0x54]
push 1
push dword [esi + 0x1898]
call fcn.1009e017
add esp, 0x14
jmp 0x10051cb1