Function at 0x10040910
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x101a03fe
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x10279264]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
xor edi, edi
test byte [0x103c3928], 1
mov dword [esp + 0x10], edi
jne 0x10040971
or dword [0x103c3928], 1
push edi
mov edx, str.com_util.readcomm.dumpbuf
mov dword [esp + 0x4c], edi
call fcn.10073350
add esp, 4
mov byte [0x103c3927], al
mov dword [esp + 0x48], 0xffffffff
mov ebx, dword [ebp + 8]
cmp ebx, 0xffffffff
je 0x10040b5c
mov eax, dword [0x103b3220]
cmp eax, edi
jne 0x100409a2
push 0x4c
call fcn.1016d7a5
add esp, 4
cmp eax, edi
je 0x1004099b
call fcn.10036030
jmp 0x1004099d
xor eax, eax
mov dword [0x103b3220], eax
mov esi, dword [ebp + 0x10]
cmp dword [eax + 0x48], edi
je 0x100409ce
mov eax, dword [eax + 0x14]
cmp eax, edi
je 0x10040a89
mov edx, dword [ebp + 0xc]
push 0x199
push str.FlashToolLib_host_windows_com_util.cpp
lea ecx, [esp + 0x18]
push ecx
push esi
push edx
push ebx
call eax
jmp 0x100409e0
mov ecx, dword [ebp + 0xc]
push edi
lea eax, [esp + 0x14]
push eax
push esi
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, edi
jne 0x10040a89
mov eax, dword [0x103b3220]
cmp eax, edi
jne 0x10040a0d
push 0x4c
call fcn.1016d7a5
add esp, 4
cmp eax, edi
je 0x10040a06
call fcn.10036030
jmp 0x10040a08
xor eax, eax
mov dword [0x103b3220], eax
cmp dword [eax + 0x48], edi
je 0x10040a27
mov eax, dword [eax + 0x18]
cmp eax, edi
je 0x10040a2f
push 0x19a
push str.FlashToolLib_host_windows_com_util.cpp
call eax
jmp 0x10040a2d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push str.FlashToolLib_host_windows_com_util.cpp
mov edx, str._ERROR:
or cl, 0xff
mov eax, 0x19b
lea esi, [esp + 0x18]
call fcn.10111280
push edi
push ebx
mov dword [esp + 0x50], 1
mov edx, dword [0x103b321c]
push str.____com_util::ReadComm__p_:_return_FALSE___Err__u_.
push edx
push eax
call fcn.10111350
mov eax, dword [ebp + 0x18]
add esp, 0x14
test eax, eax
je 0x10040a72
mov dword [eax], edi
xor eax, eax
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
mov eax, dword [ebp + 0x14]
cmp eax, edi
je 0x10040a96
mov ecx, dword [esp + 0x10]
mov dword [eax], ecx
cmp byte [0x103c3927], 0
je 0x10040b5c
mov ebx, esi
cmp esi, 8
jb 0x10040aaf
mov ebx, 8
push 0x102209a8
push 0x100
push 0x103b3720
call fcn.1016da60
add esp, 0xc
xor edi, edi
mov esi, eax
test ebx, ebx
jle 0x10040afb
mov edi, edi
mov edx, dword [ebp + 0xc]
movzx eax, byte [edi + edx]
push eax
mov ecx, 0x100
push 0x102209ac
sub ecx, esi
push ecx
lea edx, [esi + 0x103b3720]
push edx
call fcn.1016da60
inc edi
add esp, 0x10
add esi, eax
cmp edi, ebx
jl 0x10040ad0
mov eax, 0x100
push 0x102209b4
sub eax, esi
push eax
lea ecx, [esi + 0x103b3720]
push ecx
call fcn.1016da60
add esp, 0xc
push str.FlashToolLib_host_windows_com_util.cpp
mov edx, 0x10201619
xor cl, cl
mov eax, 0x1ab
lea esi, [esp + 0x2c]
call fcn.10111280
mov ecx, dword [ebp + 8]
push 0x103b3720
mov dword [esp + 0x4c], 2
mov edx, dword [esp + 0x14]
push edx
mov edx, dword [0x103b321c]
push ecx
push str.____com_util::ReadComm___p_:_len__5d____s
push edx
push eax
call fcn.10111350
add esp, 0x18
mov eax, 1
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14