Function at 0x40d388
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov ebx, dword [ebp + 8]
mov al, byte [ebp + 0x10]
mov byte [ebp - 0x49], al
mov eax, dword [ebx]
mov esi, dword [eax - 0xc]
test esi, esi
je 0x40d578
mov dword [ebp - 0x20], 0x49e1d8
mov dword [esp], 0x49e1d8
call dword [method.QReadWriteLock.lockForRead__]
mov eax, 0x49e1d8
or eax, 1
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x24]
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.0040c300
push ebx
mov edi, dword [ebp - 0x24]
mov dword [esp + 4], 0x486cfb
mov dword [esp], edi
call sub.msvcrt.dll_fopen
mov ebx, eax
lea esi, [edi - 0xc]
cmp esi, 0x485cd4
jne 0x40d687
test ebx, ebx
je 0x40d54c
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.msvcrt.dll_fseek
mov dword [esp], ebx
call sub.msvcrt.dll_ftell
mov edi, eax
test eax, eax
jle 0x40d5f0
lea eax, [eax + 1]
mov dword [esp], eax
call fcn.00477150
mov esi, eax
test eax, eax
je 0x40d5f0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.msvcrt.dll_fseek
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], edi
mov dword [esp], esi
call sub.msvcrt.dll_fread
mov byte [esi + edi], 0
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov al, byte [esi]
cmp al, 0xff
je 0x40d588
cmp al, 0xef
je 0x40d604
mov dword [ebp - 0x30], 0x485ce0
mov dword [esp + 4], 0x3c
mov dword [esp], esi
call sub.msvcrt.dll_strchr
mov edx, eax
test eax, eax
je 0x40d538
xor eax, eax
mov ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
lea edi, [ebp - 0x30]
mov dword [esp], edi
call fcn.00450e8c
lea ebx, [ebp - 0x34]
mov dword [esp + 4], edi
mov dword [esp], ebx
call fcn.0040c3ec
push edx
mov dword [esp + 4], ebx
mov edx, dword [ebp + 0xc]
mov dword [esp], edx
call fcn.00450f70
mov eax, dword [ebp - 0x34]
lea ebx, [eax - 0xc]
mov edx, 0x485cd4
cmp edx, ebx
jne 0x40d6eb
mov eax, dword [ebp - 0x30]
lea ebx, [eax - 0xc]
mov edx, 0x485cd4
cmp edx, ebx
jne 0x40d6b9
mov dword [esp], esi
call fcn.00477110
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
mov eax, dword [eax - 0xc]
test eax, eax
je 0x40d534
cmp byte [ebp - 0x49], 0
jne 0x40d630
xor eax, eax
jmp 0x40d551
mov dword [esp], esi
call fcn.00477110
lea eax, [ebp - 0x30]
mov dword [esp], eax
call fcn.004521fc
nop
mov eax, 0xffffffff
mov edx, dword [ebp - 0x20]
test edx, edx
je 0x40d56f
test dl, 1
je 0x40d56f
and edx, 0xfffffffe
mov dword [esp], edx
mov dword [ebp - 0x50], eax
call dword [method.QReadWriteLock.unlock__]
mov eax, dword [ebp - 0x50]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
mov eax, 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
cmp byte [esi + 1], 0xfe
jne 0x40d48f
mov dword [ebp - 0x28], 0x485cd0
sub edi, 2
mov eax, edi
shr eax, 0x1f
add eax, edi
sar eax, 1
mov dword [esp + 8], eax
lea eax, [esi + 2]
mov dword [esp + 4], eax
lea edi, [ebp - 0x28]
mov dword [esp], edi
call fcn.0044a390
lea ebx, [ebp - 0x2c]
mov dword [esp + 4], edi
mov dword [esp], ebx
call fcn.0040c4d8
push ecx
mov dword [esp + 4], ebx
mov edx, dword [ebp + 0xc]
mov dword [esp], edx
call fcn.00450f70
mov dword [esp], ebx
call fcn.004521fc
mov dword [esp], edi
call fcn.0044b7e0
jmp 0x40d516
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov eax, 0xffffffff
jmp 0x40d551
cmp byte [esi + 1], 0xbb
jne 0x40d48f
cmp byte [esi + 2], 0xbf
jne 0x40d48f
lea eax, [esi + 3]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call fcn.00450e58
jmp 0x40d516
lea eax, [ebp - 0x19]
mov dword [esp + 8], eax
mov dword [esp + 4], str.Huawei_Wuminghui_63386
lea esi, [ebp - 0x38]
mov dword [esp], esi
call fcn.00451c4c
lea ebx, [ebp - 0x3c]
mov dword [esp + 8], esi
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0040bce8
push edi
mov dword [esp + 4], ebx
mov edx, dword [ebp + 0xc]
mov dword [esp], edx
call fcn.00450f70
mov dword [esp], ebx
call fcn.004521fc
mov dword [esp], esi
call fcn.004521fc
xor eax, eax
jmp 0x40d551
cmp dword [0x49e25c], 0
jne 0x40d719
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov dword [esi + 8], edx
test eax, eax
jg 0x40d3fa
lea eax, [ebp - 0x1a]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.00450720
jmp 0x40d3fa
cmp dword [0x49e25c], 0
jne 0x40d759
mov eax, dword [ebx + 8]
lea edx, [eax - 1]
mov dword [ebx + 8], edx
test eax, eax
jg 0x40d516
lea eax, [ebp - 0x1c]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.00450720
jmp 0x40d516
cmp dword [0x49e25c], 0
jne 0x40d771
mov eax, dword [ebx + 8]
lea edx, [eax - 1]
mov dword [ebx + 8], edx
test eax, eax
jg 0x40d503
lea eax, [ebp - 0x1b]
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.00450720
jmp 0x40d503
mov dword [esp + 4], 0xffffffff
sub edi, 4
mov dword [esp], edi
call fcn.00429f60
jmp 0x40d69d
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.00429f60
jmp 0x40d6cf
mov dword [esp + 4], 0xffffffff
sub eax, 4
mov dword [esp], eax
call fcn.00429f60
jmp 0x40d6fd