Function at 0x10016590
Capabilities:
Check mutex on windows
Print debug messages
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1005ab74
mov eax, dword fs:[0]
push eax
mov eax, 0x13b0
call fcn.1001cfc0
mov eax, dword [0x10080704]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x13b0], 0
mov eax, dword [ebp - 0x1378]
and eax, 0xffffff01
mov dword [ebp - 0x1374], 0
or eax, 1
mov dword [ebp - 0x1380], 0
mov dword [ebp - 0x1378], eax
lea eax, [ebp - 0x1380]
push eax
call fcn.10009c40
lea ecx, [ebp - 0x1380]
mov byte [ebp - 0x13a1], al
mov dword [ebp - 4], 0xffffffff
call fcn.10009b00
cmp byte [ebp - 0x13a1], 0
je 0x10016634
push str.json_wei_kong
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor eax, eax
jmp 0x10016f6c
push ecx
push str.auth_changed
mov ecx, esi
mov dword [ebp - 0x13b4], 0
call fcn.1000a3e0
mov cl, byte [eax + 8]
test cl, cl
je 0x1001665c
cmp cl, 6
je 0x1001665c
cmp cl, 7
jne 0x10016667
mov ecx, eax
call fcn.1000a140
test eax, eax
je 0x100166d3
push ecx
push str.auth_changed
mov ecx, esi
call fcn.1000a3e0
lea ecx, [ebp - 0x1388]
push ecx
mov ecx, eax
call fcn.10009e10
cmp dword [eax + 0x14], 0x10
jb 0x1001668a
mov eax, dword [eax]
push eax
call fcn.10043020
mov edx, dword [ebp - 0x1374]
add esp, 4
mov dword [ebp - 0x13b4], eax
cmp edx, 0x10
jb 0x100166d3
mov ecx, dword [ebp - 0x1388]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x100166c9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10016f87
push edx
push ecx
call fcn.1001bf11
add esp, 8
push 0x100
lea eax, [ebp - 0x370]
mov dword [ebp - 0x13b8], 0
push 0
push eax
call fcn.10033470
push 0x100
lea eax, [ebp - 0x170]
push 0
push eax
call fcn.10033470
push 0x100
lea eax, [ebp - 0x270]
push 0
push eax
call fcn.10033470
push 0x800
lea eax, [ebp - 0x1370]
mov dword [ebp - 0x13ac], 0
push 0
push eax
call fcn.10033470
add esp, 0x2c
mov ecx, esi
push str.file_id
call fcn.1000a3e0
push 0x400
lea edx, [ebp - 0x1370]
mov ecx, dword [eax]
call fcn.100094f0
mov eax, dword [0x1006fd68]
movups xmm0, xmmword [str.GlobalFM_]
mov dword [ebp - 0xb60], eax
mov ax, word [0x1006fd6c]
push 0x7ea
mov word [ebp - 0xb5c], ax
lea eax, [ebp - 0xb5a]
push 0
push eax
movups xmmword [ebp - 0xb70], xmm0
call fcn.10033470
lea eax, [ebp - 0x1370]
push eax
lea eax, [ebp - 0xb70]
push 0x400
push eax
call fcn.10043186
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [ebp - 0xb70]
add esp, 0x1c
push eax
call edi
lea eax, [ebp - 0xb70]
push eax
push 0
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov dword [ebp - 0x13a8], eax
test eax, eax
je 0x1001686e
push 4
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x13b0], eax
test eax, eax
jne 0x10016812
lea eax, [ebp - 0xb70]
push eax
push str._s_MapViewOfFile_Failed_1
call fcn.10010e40
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 8
push dword [ebp - 0x13a8]
call eax
jmp 0x10016889
mov eax, dword [eax]
push eax
mov dword [ebp - 0x13ac], eax
lea eax, [ebp - 0xb70]
push eax
push str._s_is_existed_Info:_d
call fcn.10010e40
add esp, 0xc
push dword [ebp - 0x13b0]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x13a8]
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
push str.GPCM_CheckMutex_return_true
call edi
push dword [ebp - 0x13ac]
mov dword [ebp - 0x13a8], 1
push str.GPCM_CheckMutex_FM_true_Getinfo:_d
call fcn.10010e40
add esp, 8
jmp 0x10016893
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.OpenFileMapping_Failed_Error:_d
call fcn.10010e40
add esp, 8
push str.GPCM_CheckMutex_return_false
call edi
mov dword [ebp - 0x13a8], 0
push ecx
push str.author
mov ecx, esi
call fcn.1000a3e0
push 0x80
lea edx, [ebp - 0x370]
mov ecx, dword [eax]
call fcn.100094f0
push 0x10070820
mov ecx, esi
call fcn.1000a3e0
lea ecx, [ebp - 0x1388]
push ecx
mov ecx, eax
call fcn.10009e10
cmp dword [eax + 0x14], 0x10
jb 0x100168d4
mov eax, dword [eax]
push eax
call fcn.10043020
mov edx, dword [ebp - 0x1374]
add esp, 4
mov dword [ebp - 0x13bc], eax
cmp edx, 0x10
jb 0x1001691d
mov ecx, dword [ebp - 0x1388]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10016913
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10016f8c
push edx
push ecx
call fcn.1001bf11
add esp, 8
push ecx
push str.remain_count
mov ecx, esi
call fcn.1000a3e0
lea ecx, [ebp - 0x13a0]
push ecx
mov ecx, eax
call fcn.10009e10
mov dword [ebp - 4], 1
mov edx, 1
cmp dword [eax + 0x14], 0x10
mov ecx, eax
mov dword [ebp - 0x13b0], edx
jb 0x10016954
mov ecx, dword [eax]
cmp dword [eax + 0x10], 2
jne 0x10016976
movzx eax, byte [ecx]
cmp al, 0x2d
jne 0x1001696d
movzx eax, byte [ecx + 1]
cmp al, 0x31
jne 0x1001696d
xor eax, eax
jmp 0x10016972
sbb eax, eax
or eax, 1
test eax, eax
je 0x100169a3
push ecx
push str.remain_count
mov ecx, esi
call fcn.1000a3e0
lea ecx, [ebp - 0x1388]
push ecx
mov ecx, eax
call fcn.10009e10
mov edx, 3
mov byte [ebp - 0x13a1], 0
cmp dword [eax + 0x10], 0
jne 0x100169aa
mov byte [ebp - 0x13a1], 1
test dl, 2
je 0x10016a04
mov edx, dword [ebp - 0x1374]
cmp edx, 0x10
jb 0x100169e9
mov ecx, dword [ebp - 0x1388]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x100169df
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10016f91
push edx
push ecx
call fcn.1001bf11
add esp, 8
mov dword [ebp - 0x1378], 0
mov dword [ebp - 0x1374], 0xf
mov byte [ebp - 0x1388], 0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x138c]
cmp edx, 0x10
jb 0x10016a45
mov ecx, dword [ebp - 0x13a0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10016a3b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10016f96
push edx
push ecx
call fcn.1001bf11
add esp, 8
cmp byte [ebp - 0x13a1], 0
je 0x10016a56
or edi, 0xffffffff
jmp 0x10016b03
push ecx
push str.remain_count
mov ecx, esi
call fcn.1000a3e0
lea ecx, [ebp - 0x13a0]
push ecx
mov ecx, eax
call fcn.10009e10
cmp dword [eax + 0x14], 0x10
jb 0x10016a79
mov eax, dword [eax]
push eax
call fcn.10043020
mov edx, dword [ebp - 0x138c]
add esp, 4
mov edi, eax
cmp edx, 0x10
jb 0x10016abe
mov ecx, dword [ebp - 0x13a0]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10016ab4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10016f9b
push edx
push ecx
call fcn.1001bf11
add esp, 8
cmp dword [ebp - 0x13a8], 0
je 0x10016acf
mov edi, dword [ebp - 0x13ac]
jmp 0x10016b03
mov eax, dword [ebp + 8]
test eax, eax
js 0x10016b03
cmp dword [ebp - 0x13b4], 0
jne 0x10016b03
push edi
push eax
push str.nOfflineOpenCount:_d_nRemainCount:_d
call fcn.10010e40
mov eax, dword [ebp + 8]
add esp, 0xc
test eax, eax
je 0x10016b01
test edi, edi
je 0x10016b01
cmp eax, edi
jge 0x10016b03
mov edi, eax
jmp 0x10016b03
xor edi, edi
push ecx
push str.start_time
mov ecx, esi
call fcn.1000a3e0
push 0x80
lea edx, [ebp - 0x170]
mov ecx, dword [eax]
call fcn.100094f0
push str.end_time
mov ecx, esi
call fcn.1000a3e0
push 0x80
lea edx, [ebp - 0x270]
mov ecx, dword [eax]
call fcn.100094f0
xor eax, eax
add esp, 4
cmp edi, 0xffffffff
setne al
cmp word [ebp - 0x170], 0
mov dword [ebp - 0x13ac], eax
je 0x10016b64
or eax, 2
mov dword [ebp - 0x13ac], eax
push edi
push eax
push str.nExtraPer:_d_nRemainCount:_d
call fcn.10010e40
mov ecx, dword [ebp - 0x13ac]
lea eax, [ebp - 0x270]
push eax
lea eax, [ebp - 0x170]
mov edx, edi
push eax
call fcn.10016020
add esp, 0x14
test eax, eax
jne 0x10016d36
push eax
push str.CheckOtherPermission_af_Return_Error:_d
call fcn.10010e40
mov eax, dword [ebp - 0x13ac]
add esp, 8
cmp eax, 1
je 0x10016bb8
cmp eax, 3
jne 0x10016f37
cmp edi, 1
jge 0x10016f37
push 0x100700a8
lea ecx, [ebp - 0x1380]
call fcn.100097e0
lea eax, [ebp - 0x1380]
mov dword [ebp - 4], 2
push eax
push ecx
push str.remain_count
mov ecx, esi
call fcn.1000a3e0
mov ecx, eax
call fcn.10009bc0
lea ecx, [ebp - 0x1380]
mov dword [ebp - 4], 0xffffffff
call fcn.10009b00
push 0x100700a8
lea ecx, [ebp - 0x1380]
call fcn.100097e0
lea eax, [ebp - 0x1380]
mov dword [ebp - 4], 3
push eax
push ecx
push str.FMMutexInfo
mov ecx, esi
call fcn.1000a3e0
mov ecx, eax
call fcn.10009bc0
lea ecx, [ebp - 0x1380]
mov dword [ebp - 4], 0xffffffff
call fcn.10009b00
cmp dword [ebp + 0xc], 0
je 0x10016f37
push 0x800
lea eax, [ebp - 0x1370]
push 0
push eax
call fcn.10033470
add esp, 8
mov ecx, esi
push str.file_id
call fcn.1000a3e0
push 0x400
lea edx, [ebp - 0x1370]
mov ecx, dword [eax]
call fcn.100094f0
movups xmm0, xmmword [str.Global_]
push 0x7f0
lea eax, [ebp - 0xb60]
push 0
push eax
movups xmmword [ebp - 0xb70], xmm0
call fcn.10033470
lea eax, [ebp - 0x1370]
push eax
lea eax, [ebp - 0xb70]
push 0x400
push eax
call fcn.10043186
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [ebp - 0xb70]
add esp, 0x1c
push eax
call edi
lea eax, [ebp - 0xb70]
push eax
push 0
push 0x1f0001
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
test eax, eax
jne 0x10016d1c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x10016d23
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GPCM_CheckMutex_LastError:_d
call fcn.10010e40
add esp, 8
push str.GPCM_CheckMutex_return_false
call edi
mov ecx, esi
call fcn.10016250
jmp 0x10016f3d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.GPCM_CheckMutex_return_true
call edi
push str.GPCM_CheckMutex_true
call edi
jmp 0x10016f3d
mov eax, dword [ebp - 0x13ac]
cmp eax, 1
je 0x10016d4a
cmp eax, 3
jne 0x10016f08
xorps xmm0, xmm0
lea eax, [ebp - 0x70]
push edi
push 0x1007009c
push eax
movups xmmword [ebp - 0x30], xmm0
movups xmmword [ebp - 0x20], xmm0
movups xmmword [ebp - 0x70], xmm0
movups xmmword [ebp - 0x60], xmm0
call fcn.10019490
lea eax, [edi - 1]
xorps xmm0, xmm0
push eax
lea eax, [ebp - 0x50]
push 0x1007009c
push eax
movups xmmword [ebp - 0x50], xmm0
movups xmmword [ebp - 0x40], xmm0
call fcn.10019490
mov edi, dword [ebp + 0xc]
add esp, 0x18
test edi, edi
je 0x10016d97
push 0
jmp 0x10016d9c
mov eax, dword [ebp + 8]
inc eax
push eax
lea eax, [ebp - 0x30]
push 0x1007009c
push eax
call fcn.10019490
mov eax, dword [ebp - 0x1378]
lea edx, [ebp - 0x50]
mov ecx, dword [0x10081120]
and eax, 0xffffff04
or eax, 0x104
mov dword [ebp - 0x1374], 0
add esp, 0xc
mov dword [ebp - 0x1378], eax
mov eax, dword [ecx]
push 0xffffffffffffffff
push edx
mov eax, dword [eax + 0xc]
call eax
mov dword [ebp - 0x1380], eax
lea eax, [ebp - 0x1380]
mov dword [ebp - 4], 4
push eax
push ecx
push str.remain_count
mov ecx, esi
call fcn.1000a3e0
mov ecx, eax
call fcn.10009bc0
lea ecx, [ebp - 0x1380]
mov dword [ebp - 4], 0xffffffff
call fcn.10009b00
mov eax, dword [ebp - 0x1378]
lea edx, [ebp - 0x30]
mov ecx, dword [0x10081120]
and eax, 0xffffff04
or eax, 0x104
mov dword [ebp - 0x1374], 0
mov dword [ebp - 0x1378], eax
push 0xffffffffffffffff
mov eax, dword [ecx]
push edx
mov eax, dword [eax + 0xc]
call eax
mov dword [ebp - 0x1380], eax
lea eax, [ebp - 0x1380]
mov dword [ebp - 4], 5
push eax
push ecx
push str.offline_open_count
mov ecx, esi
call fcn.1000a3e0
mov ecx, eax
call fcn.10009bc0
lea ecx, [ebp - 0x1380]
mov dword [ebp - 4], 0xffffffff
call fcn.10009b00
mov eax, dword [ebp - 0x1378]
lea edx, [ebp - 0x70]
mov ecx, dword [0x10081120]
and eax, 0xffffff04
or eax, 0x104
mov dword [ebp - 0x1374], 0
mov dword [ebp - 0x1378], eax
push 0xffffffffffffffff
mov eax, dword [ecx]
push edx
mov eax, dword [eax + 0xc]
call eax
mov dword [ebp - 0x1380], eax
lea eax, [ebp - 0x1380]
mov dword [ebp - 4], 6
push eax
push ecx
push str.FMMutexInfo
mov ecx, esi
call fcn.1000a3e0
mov ecx, eax
call fcn.10009bc0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1380]
call fcn.10009b00
test edi, edi
je 0x10016f08
cmp dword [ebp - 0x13a8], 0
jne 0x10016f1c
mov ecx, esi
call fcn.10016250
mov eax, dword [ebp - 0x13bc]
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov dword [ebp - 0x13b8], eax
jmp 0x10016f3d
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str.GPCM_CheckMutex_true
call edi
mov eax, dword [ebp - 0x13bc]
mov dword [ebp - 0x13b8], eax
jmp 0x10016f3d
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x13a8], 0
jne 0x10016f4f
mov ecx, esi
call fcn.100139f0
jmp 0x10016f56
push str.GPCM_CheckMutex_true
call edi
mov esi, dword [ebp - 0x13b8]
push esi
push str.Final_Return_Error:_d
call fcn.10010e40
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1001bcd0
mov esp, ebp
pop ebp
ret
call fcn.10041b97
call fcn.10041b97
call fcn.10041b97
call fcn.10041b97
call fcn.10041b97
int3