Function at 0x1002ccc0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x10050636
push eax
mov dword fs:[0], esp
sub esp, 0x1a0
mov eax, dword [0x1006f18c]
push ebx
push esi
push edi
test al, 1
jne 0x1002cd25
or eax, 1
mov dword [0x1006f18c], eax
sub esp, 8
mov dword [esp + 0x1bc], 0
call fcn.1000ab90
push 0x100520b0
call fcn.10013501
mov dword [esp + 0x1b8], 0xffffffff
add esp, 4
mov eax, dword [0x1006f18c]
test al, 2
jne 0x1002cd5c
or eax, 2
mov dword [0x1006f1b0], 0
push 0x10052050
mov dword [0x1006f18c], eax
mov dword [0x1006f1b4], 0
mov dword [0x1006f1b8], 0
call fcn.10013501
add esp, 4
cmp byte [0x1006f15d], 0
jne 0x1002d251
push 0x104
lea eax, [esp + 0xa4]
push 0
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
mov dword [esp + 0x68], 0xf
mov dword [esp + 0x64], 0
mov byte [esp + 0x54], 0
lea eax, [esp + 0x54]
mov dword [esp + 0x1b4], 1
push eax
push 0x64
call sym.KwLib.dll_int___cdecl_KwLib::Dir::GetKwPath_enum_KwLib::Dir::Path_Type__class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char____
cmp dword [esp + 0x70], 0x10
lea eax, [esp + 0x5c]
push 0x103
cmovae eax, dword [esp + 0x60]
push eax
lea eax, [esp + 0xb0]
push 0x104
push eax
call dword [sym.imp.MSVCR120.dll_strncpy_s]
lea ecx, [esp + 0xb8]
add esp, 0x18
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1002cde0
sub ecx, edx
mov eax, 0x103
sub eax, ecx
push eax
push str.hanzi_pinyin.dict
lea eax, [esp + 0xa8]
push 0x104
push eax
call dword [sym.imp.MSVCR120.dll_strncat_s]
mov eax, dword [0x1006e3e8]
add esp, 0x10
mov dword [esp + 0x10], 0
cmp eax, 0xffffffff
jne 0x1002ce58
lea eax, [esp + 0x6c]
push eax
push 0xd698
call dword [sym.imp.KERNEL32.dll_GetCPInfo]
test eax, eax
jne 0x1002ce4e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x1002ce4e
mov dword [0x1006e3e8], 0x3a8
mov eax, 0x3a8
jmp 0x1002ce58
mov eax, 0xd698
mov dword [0x1006e3e8], eax
push eax
lea edx, [esp + 0xa4]
lea ecx, [esp + 0x84]
call fcn.10004760
add esp, 4
mov edx, eax
mov byte [esp + 0x1b4], 2
cmp dword [edx + 0x14], 8
jb 0x1002ce81
mov edx, dword [edx]
xor eax, eax
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], 0
mov word [esp + 0x3c], ax
cmp word [edx], ax
jne 0x1002cea1
xor ecx, ecx
jmp 0x1002ceb5
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1002cea6
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0x44]
call fcn.100026d0
mov byte [esp + 0x1b4], 4
cmp dword [esp + 0x94], 8
mov ebx, dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
jb 0x1002cee4
push dword [esp + 0x80]
call ebx
add esp, 4
xor eax, eax
mov dword [esp + 0x94], 7
cmp dword [esp + 0x50], 8
mov word [esp + 0x80], ax
lea eax, [esp + 0x3c]
cmovae eax, dword [esp + 0x3c]
push 0x1005a42c
push eax
lea eax, [esp + 0x18]
mov dword [esp + 0x98], 0
push eax
call dword [sym.imp.MSVCR120.dll__wfopen_s]
add esp, 0xc
test eax, eax
jne 0x1002d2b0
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1002d2b0
mov edi, dword [sym.imp.MSVCR120.dll_fseek]
push 2
push 0
push eax
call edi
add esp, 0xc
push dword [esp + 0x10]
call dword [sym.imp.MSVCR120.dll_ftell]
add esp, 4
mov esi, eax
push esi
call fcn.10013326
add esp, 4
mov ebx, eax
push esi
push 0
push ebx
call sub.MSVCR120.dll_memset
add esp, 0xc
push 0
push 0
push dword [esp + 0x18]
call edi
add esp, 0xc
push dword [esp + 0x10]
push 1
push esi
push ebx
call dword [sym.imp.MSVCR120.dll_fread]
push dword [esp + 0x20]
call dword [sym.imp.MSVCR120.dll_fclose]
mov byte [esp + 0x4b], 0
add esp, 0x14
mov al, byte [ebx]
test al, al
je 0x1002d202
jns 0x1002d1f6
movzx eax, word [ebx]
add ebx, 3
xor edi, edi
mov dword [esp + 0x14], eax
mov dword [esp + 0x38], edi
mov eax, ebx
nop
mov cl, byte [ebx]
cmp cl, 0x60
jle 0x1002cfcf
cmp cl, 0x7b
jge 0x1002cfcf
inc ebx
jmp 0x1002cfc0
mov esi, ebx
sub esi, eax
push esi
push eax
lea eax, [esp + 0x38]
push eax
call sub.MSVCR120.dll_memcpy
add esp, 0xc
mov byte [esp + esi + 0x30], 0
cmp byte [esp + 0x30], 0
mov dword [esp + 0x2c], 0xf
mov dword [esp + 0x28], 0
mov byte [esp + 0x18], 0
jne 0x1002d007
xor ecx, ecx
jmp 0x1002d019
lea ecx, [esp + 0x30]
lea edx, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1002d010
sub ecx, edx
push ecx
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x20]
call fcn.10001a10
mov byte [esp + 0x1b4], 5
lea eax, [esp + 0x18]
mov esi, dword [0x1006f1b4]
cmp eax, esi
jae 0x1002d0f4
mov ecx, eax
mov eax, dword [0x1006f1b0]
cmp eax, ecx
ja 0x1002d0f4
sub ecx, eax
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov edi, edx
shr edi, 0x1f
add edi, edx
cmp esi, dword [0x1006f1b8]
jne 0x1002d07d
push ecx
mov ecx, 0x1006f1b0
call fcn.10004440
mov esi, dword [0x1006f1b4]
mov eax, dword [0x1006f1b0]
lea ecx, [edi + edi*2]
lea edi, [eax + ecx*8]
test esi, esi
je 0x1002d0eb
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], 0
mov byte [esi], 0
cmp dword [edi + 0x14], 0x10
jae 0x1002d0be
mov eax, dword [edi + 0x10]
inc eax
je 0x1002d0c8
push eax
push edi
push esi
call dword [sym.imp.MSVCR120.dll_memmove]
add esp, 0xc
jmp 0x1002d0c8
mov eax, dword [edi]
mov dword [esi], eax
mov dword [edi], 0
mov eax, dword [edi + 0x10]
mov dword [esi + 0x10], eax
mov eax, dword [edi + 0x14]
mov dword [esi + 0x14], eax
mov dword [edi + 0x14], 0xf
mov dword [edi + 0x10], 0
mov byte [edi], 0
mov esi, dword [0x1006f1b4]
mov edi, dword [esp + 0x38]
jmp 0x1002d180
cmp esi, dword [0x1006f1b8]
jne 0x1002d10d
push ecx
mov ecx, 0x1006f1b0
call fcn.10004440
mov esi, dword [0x1006f1b4]
test esi, esi
je 0x1002d180
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], 0
mov byte [esi], 0
cmp dword [esp + 0x2c], 0x10
jae 0x1002d149
mov eax, dword [esp + 0x28]
inc eax
je 0x1002d157
push eax
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.MSVCR120.dll_memmove]
add esp, 0xc
jmp 0x1002d157
mov eax, dword [esp + 0x18]
mov dword [esi], eax
mov dword [esp + 0x18], 0
mov eax, dword [esp + 0x28]
mov dword [esi + 0x10], eax
mov eax, dword [esp + 0x2c]
mov dword [esi + 0x14], eax
mov esi, dword [0x1006f1b4]
mov dword [esp + 0x2c], 0xf
mov dword [esp + 0x28], 0
mov byte [esp + 0x18], 0
add esi, 0x18
mov byte [esp + 0x1b4], 4
cmp dword [esp + 0x2c], 0x10
mov dword [0x1006f1b4], esi
jb 0x1002d1ab
push dword [esp + 0x18]
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
mov esi, dword [0x1006f1b4]
add esp, 4
inc edi
cmp byte [ebx], 0xa
mov dword [esp + 0x38], edi
je 0x1002d1bb
inc ebx
jmp 0x1002cfbd
sub esi, dword [0x1006f1b0]
mov eax, 0x2aaaaaab
mov ecx, dword [esp + 0x14]
imul esi
mov word [esp + 0x6c], cx
sar edx, 2
mov eax, edx
mov dword [esp + 0x74], edi
shr eax, 0x1f
dec eax
add eax, edx
mov dword [esp + 0x70], eax
lea eax, [esp + 0x6c]
push eax
lea eax, [esp + 0x9c]
push eax
call fcn.1000b240
mov al, byte [ebx + 1]
inc ebx
test al, al
jne 0x1002cfa7
cmp dword [esp + 0x50], 8
mov ebx, dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete_void__]
mov byte [0x1006f15d], 1
jb 0x1002d21f
push dword [esp + 0x3c]
call ebx
add esp, 4
xor eax, eax
mov dword [esp + 0x1b4], 0xffffffff
cmp dword [esp + 0x68], 0x10
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], 0
mov word [esp + 0x3c], ax
jb 0x1002d251
push dword [esp + 0x54]
call ebx
add esp, 4
push dword [ebp + 8]
lea eax, [esp + 0x18]
push eax
call fcn.1000ac50
mov esi, dword [esp + 0x14]
cmp esi, dword [0x1006f190]
je 0x1002d2e7
mov ebx, dword [esi + 0x10]
mov eax, dword [esi + 0xc]
test ebx, ebx
jle 0x1002d298
lea edi, [eax + eax*2]
shl edi, 3
mov edi, edi
mov eax, dword [0x1006f1b0]
mov ecx, dword [ebp + 0xc]
add eax, edi
push eax
call fcn.10007ce0
dec ebx
add edi, 0x18
test ebx, ebx
jg 0x1002d280
mov eax, dword [esi + 0x10]
mov ecx, dword [esp + 0x1ac]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0x50], 8
jb 0x1002d2c0
push dword [esp + 0x3c]
call ebx
add esp, 4
xor eax, eax
mov dword [esp + 0x50], 7
cmp dword [esp + 0x68], 0x10
mov dword [esp + 0x4c], 0
mov word [esp + 0x3c], ax
jb 0x1002d2e7
push dword [esp + 0x54]
call ebx
add esp, 4
mov ecx, dword [esp + 0x1ac]
or eax, 0xffffffff
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret