Function at 0x406470
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x378
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x178]
push ebx
push ebp
push esi
push edi
mov edi, 0x59da84
push 0x585050
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [0x59db94], 1
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x18c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ime_py.dat
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x18c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, dword [sym.imp.MSVCRT.dll_fread]
mov edi, eax
xor ebx, ebx
add esp, 8
cmp edi, ebx
jne 0x40651f
mov ecx, dword [sym.imp.MSVCRT.dll__iob]
push str._nCan_not_find_System_Database_of_Pinyin__n
add ecx, 0x40
push ecx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 8
jmp 0x406828
push ebx
push 0x292cc
push edi
call dword [sym.imp.MSVCRT.dll_fseek]
mov al, byte [edi + 0xc]
add esp, 0xc
test al, 0x10
jne 0x406814
push edi
push 1
lea edx, [esp + 0x18]
push 4
push edx
call esi
add esp, 0x10
test eax, eax
je 0x406814
push edi
push 1
lea eax, [esp + 0x28]
push 2
push eax
call esi
add esp, 0x10
test eax, eax
je 0x406814
push edi
push 1
lea ecx, [esp + 0x24]
push 4
push ecx
mov byte [esp + 0x32], 0
call esi
add esp, 0x10
test eax, eax
je 0x406814
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x20]
push edx
push eax
call fcn.00406f80
add esp, 8
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x406814
mov ecx, dword [esp + 0x10]
mov edx, dword [0x59da7c]
shl eax, 5
lea ecx, [ecx + ecx*2]
mov ecx, dword [edx + ecx*4 + 4]
mov edx, dword [esp + 0x1c]
mov dword [ecx + eax + 8], edx
mov eax, dword [esp + 0x1c]
lea eax, [eax + eax*2]
shl eax, 3
push eax
call fcn.00478e60
mov ecx, dword [esp + 0x14]
mov ebp, dword [0x59da7c]
mov edx, dword [esp + 0x18]
add esp, 4
lea ecx, [ecx + ecx*2]
shl edx, 5
mov ecx, dword [ebp + ecx*4 + 4]
mov dword [ecx + edx + 4], eax
mov eax, dword [esp + 0x10]
mov ecx, dword [0x59da7c]
mov dword [esp + 0x1c], ebx
lea edx, [eax + eax*2]
mov eax, dword [esp + 0x14]
shl eax, 5
mov edx, dword [ecx + edx*4 + 4]
cmp dword [edx + eax + 8], ebx
jle 0x40680a
push edi
push 1
lea eax, [esp + 0x20]
push 4
push eax
call esi
mov ecx, dword [esp + 0x28]
inc ecx
push ecx
call fcn.00478e60
mov ecx, dword [esp + 0x24]
mov ebp, dword [esp + 0x28]
shl ebp, 5
lea edx, [ecx + ecx*2]
mov ecx, dword [0x59da7c]
push edi
push 1
mov edx, dword [ecx + edx*4 + 4]
mov ecx, dword [esp + 0x38]
mov edx, dword [edx + ebp + 4]
lea ecx, [ecx + ecx*2]
mov dword [edx + ecx*8 + 4], eax
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
push eax
mov eax, dword [esp + 0x30]
shl edx, 5
lea ecx, [eax + eax*2]
mov eax, dword [0x59da7c]
mov ecx, dword [eax + ecx*4 + 4]
mov eax, dword [esp + 0x3c]
mov ecx, dword [ecx + edx + 4]
lea eax, [eax + eax*2]
mov edx, dword [ecx + eax*8 + 4]
push edx
call esi
mov eax, dword [esp + 0x34]
mov edx, dword [0x59da7c]
mov ecx, dword [esp + 0x38]
lea eax, [eax + eax*2]
shl ecx, 5
mov edx, dword [edx + eax*4 + 4]
mov eax, dword [esp + 0x40]
mov ecx, dword [edx + ecx + 4]
lea eax, [eax + eax*2]
mov edx, dword [ecx + eax*8 + 4]
mov eax, dword [esp + 0x3c]
mov byte [edx + eax], 0
mov ecx, dword [esp + 0x3c]
inc ecx
push ecx
call fcn.00478e60
mov ecx, dword [esp + 0x38]
mov ebp, dword [esp + 0x3c]
shl ebp, 5
lea edx, [ecx + ecx*2]
mov ecx, dword [0x59da7c]
push edi
push 1
mov edx, dword [ecx + edx*4 + 4]
mov ecx, dword [esp + 0x4c]
mov edx, dword [edx + ebp + 4]
lea ecx, [ecx + ecx*2]
mov dword [edx + ecx*8], eax
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x44]
push eax
mov eax, dword [esp + 0x44]
shl edx, 5
lea ecx, [eax + eax*2]
mov eax, dword [0x59da7c]
mov ecx, dword [eax + ecx*4 + 4]
mov eax, dword [esp + 0x50]
mov ecx, dword [ecx + edx + 4]
lea eax, [eax + eax*2]
mov edx, dword [ecx + eax*8]
push edx
call esi
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
lea eax, [eax + eax*2]
mov edx, dword [0x59da7c]
push edi
shl ecx, 5
mov edx, dword [edx + eax*4 + 4]
mov eax, dword [esp + 0x58]
push 1
push 4
mov ecx, dword [edx + ecx + 4]
lea eax, [eax + eax*2]
mov edx, dword [ecx + eax*8]
mov eax, dword [esp + 0x5c]
lea ecx, [esp + 0x5c]
push ecx
mov byte [edx + eax], 0
call esi
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
shl ecx, 5
lea edx, [eax + eax*2]
mov eax, dword [0x59da7c]
add esp, 0x48
mov edx, dword [eax + edx*4 + 4]
mov eax, dword [esp + 0x1c]
mov ecx, dword [edx + ecx + 4]
mov edx, dword [esp + 0x18]
lea eax, [eax + eax*2]
mov dword [ecx + eax*8 + 0xc], edx
mov eax, dword [esp + 0x18]
cmp eax, dword [0x59db88]
jbe 0x40678b
mov dword [0x59db88], eax
mov eax, dword [esp + 0x10]
mov edx, dword [0x59da7c]
mov ecx, dword [esp + 0x14]
lea eax, [eax + eax*2]
shl ecx, 5
mov edx, dword [edx + eax*4 + 4]
mov eax, dword [esp + 0x1c]
mov ecx, dword [edx + ecx + 4]
lea eax, [eax + eax*2]
mov dword [ecx + eax*8 + 0x10], ebx
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
lea edx, [eax + eax*2]
mov eax, dword [0x59da7c]
shl ecx, 5
mov edx, dword [eax + edx*4 + 4]
mov eax, dword [esp + 0x1c]
mov ecx, dword [edx + ecx + 4]
lea eax, [eax + eax*2]
lea eax, [ecx + eax*8 + 0x14]
mov ecx, dword [eax]
and ecx, 0xfffffffe
mov dword [eax], ecx
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
mov ebp, dword [0x59da7c]
inc ecx
lea edx, [eax + eax*2]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], ecx
mov edx, dword [ebp + edx*4 + 4]
shl eax, 5
cmp ecx, dword [edx + eax + 8]
jl 0x406614
test byte [edi + 0xc], 0x10
je 0x40653a
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [0x59db88]
add esp, 4
mov dword [0x59db8c], eax
push ebx
push 0x585050
push str.ime_pyusr.dat
call fcn.00406190
mov ebp, eax
add esp, 0xc
cmp ebp, ebx
je 0x4069fb
test byte [ebp + 0xc], 0x10
jne 0x4069f1
jmp 0x406853
xor ebx, ebx
push ebp
push 1
lea ecx, [esp + 0x18]
push 4
push ecx
call esi
add esp, 0x10
test eax, eax
je 0x4069f1
push ebp
push 1
lea edx, [esp + 0x28]
push 2
push edx
call esi
add esp, 0x10
test eax, eax
je 0x4069f1
push ebp
push 1
lea eax, [esp + 0x24]
push 4
push eax
mov byte [esp + 0x32], 0
call esi
add esp, 0x10
test eax, eax
je 0x4069f1
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x20]
push ecx
push edx
call fcn.00406f80
add esp, 8
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x4069f1
mov ecx, dword [esp + 0x10]
mov edx, dword [0x59da7c]
shl eax, 5
lea ecx, [ecx + ecx*2]
mov ecx, dword [edx + ecx*4 + 4]
mov edx, dword [esp + 0x1c]
mov dword [ecx + eax + 0x10], edx
mov eax, dword [esp + 0x10]
mov ecx, dword [0x59da7c]
lea eax, [eax + eax*2]
mov edx, dword [ecx + eax*4 + 4]
lea ecx, [ecx + eax*4 + 4]
mov eax, dword [esp + 0x14]
shl eax, 5
mov ebx, dword [eax + edx + 0xc]
mov dword [esp + 0x1c], 0
mov ecx, dword [ecx]
mov edx, dword [eax + ecx + 0x10]
test edx, edx
jle 0x4069e5
push 0x18
call fcn.00478e60
push ebp
push 1
lea edx, [esp + 0x24]
push 4
push edx
mov edi, eax
call esi
mov eax, dword [esp + 0x2c]
inc eax
push eax
call fcn.00478e60
mov dword [edi + 4], eax
mov ecx, dword [esp + 0x30]
push ebp
push 1
push ecx
push eax
call esi
mov edx, dword [edi + 4]
mov eax, dword [esp + 0x40]
mov byte [eax + edx], 0
mov ecx, dword [esp + 0x40]
inc ecx
push ecx
call fcn.00478e60
mov dword [edi], eax
mov edx, dword [esp + 0x44]
push ebp
push 1
push edx
push eax
call esi
mov eax, dword [edi]
mov ecx, dword [esp + 0x54]
push ebp
push 1
lea edx, [esp + 0x5c]
push 4
push edx
mov byte [eax + ecx], 0
call esi
mov eax, dword [esp + 0x64]
add esp, 0x4c
mov dword [edi + 0xc], eax
mov eax, dword [esp + 0x18]
cmp eax, dword [0x59db88]
jbe 0x406990
mov dword [0x59db88], eax
push ebp
push 1
lea ecx, [esp + 0x20]
push 4
push ecx
call esi
mov ecx, dword [edi + 0x14]
mov edx, dword [esp + 0x28]
and ecx, 0xfffffffe
mov dword [edi + 0x10], edx
mov dword [edi + 0x14], ecx
mov eax, dword [ebx + 8]
mov dword [edi + 8], eax
mov dword [ebx + 8], edi
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x2c]
add esp, 0x10
mov ebx, edi
mov edi, dword [0x59da7c]
inc ecx
lea edx, [eax + eax*2]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], ecx
mov edx, dword [edi + edx*4 + 4]
shl eax, 5
cmp ecx, dword [edx + eax + 0x10]
jl 0x40690e
test byte [ebp + 0xc], 0x10
je 0x406851
xor ebx, ebx
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
push ebx
push 0x585050
push str.ime_pyindex.dat
call fcn.00406190
mov edi, eax
add esp, 0xc
cmp edi, ebx
je 0x406b3b
push edi
push 1
lea eax, [esp + 0x20]
push 4
push eax
call esi
mov eax, dword [esp + 0x28]
mov ecx, dword [0x59db88]
add esp, 0x10
cmp eax, ecx
jbe 0x406a3a
mov dword [0x59db88], eax
test byte [edi + 0xc], 0x10
jne 0x406b31
push edi
push 1
lea ecx, [esp + 0x18]
push 4
push ecx
call esi
push edi
push 1
lea edx, [esp + 0x2c]
push 4
push edx
call esi
push edi
push 1
lea eax, [esp + 0x44]
push 4
push eax
call esi
push edi
push 1
lea ecx, [esp + 0x60]
push 4
push ecx
call esi
add esp, 0x40
lea edx, [esp + 0x18]
push edi
push 1
push 4
push edx
call esi
mov eax, dword [esp + 0x20]
mov ecx, dword [0x59da80]
add esp, 0x10
cmp eax, ecx
jge 0x406b27
mov ecx, dword [0x59da7c]
lea eax, [eax + eax*2]
mov edx, dword [ecx + eax*4 + 8]
lea ecx, [ecx + eax*4]
mov eax, dword [esp + 0x14]
cmp eax, edx
jge 0x406b27
mov edx, dword [ecx + 4]
shl eax, 5
lea ecx, [edx + eax]
mov eax, dword [esp + 0x1c]
cmp eax, dword [ecx + 8]
jge 0x406b27
cmp eax, ebx
jl 0x406b01
mov ecx, dword [ecx + 4]
mov edx, dword [esp + 0x28]
lea eax, [eax + eax*2]
mov dword [ecx + eax*8 + 0xc], edx
mov eax, dword [esp + 0x10]
mov edx, dword [0x59da7c]
mov ecx, dword [esp + 0x14]
lea eax, [eax + eax*2]
shl ecx, 5
mov edx, dword [edx + eax*4 + 4]
mov eax, dword [esp + 0x1c]
mov ecx, dword [edx + ecx + 4]
mov edx, dword [esp + 0x18]
lea eax, [eax + eax*2]
mov dword [ecx + eax*8 + 0x10], edx
jmp 0x406b27
mov eax, dword [esp + 0x28]
mov dword [ecx + 0x14], eax
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
lea ecx, [eax + eax*2]
mov eax, dword [0x59da7c]
shl edx, 5
mov ecx, dword [eax + ecx*4 + 4]
mov eax, dword [esp + 0x18]
mov dword [ecx + edx + 0x18], eax
test byte [edi + 0xc], 0x10
je 0x406a44
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
push ebx
push 0x585050
push str.ime_pyfreq.dat
call fcn.00406190
mov ebp, eax
add esp, 0xc
cmp ebp, ebx
je 0x406c73
mov ecx, dword [0x59db98]
push ebp
push 1
push 4
push 0x59dba0
mov dword [esp + 0x3c], ecx
call esi
mov eax, dword [0x59dba0]
add esp, 0x10
cmp eax, ebx
mov dword [esp + 0x10], ebx
jbe 0x406c69
push 0x50
call fcn.00478e60
mov ebx, eax
push ebp
push 1
xor edi, edi
lea edx, [ebx + 4]
push 0xb
push edx
mov dword [ebx + 0x4c], edi
mov dword [ebx + 0x48], edi
call esi
push ebp
push 1
lea eax, [esp + 0x30]
push 4
push eax
call esi
mov ecx, dword [esp + 0x38]
push 0x2c
mov dword [ebx + 0x44], ecx
call fcn.00478e60
mov dword [ebx], eax
mov dword [eax + 0x24], edi
mov edx, dword [ebx]
mov dword [esp + 0x44], edi
mov eax, dword [ebx + 0x44]
add esp, 0x28
cmp eax, edi
mov dword [esp + 0x24], edx
jbe 0x406c45
push 0x2c
call fcn.00478e60
push ebp
mov edi, eax
push 1
push 2
push edi
call esi
push ebp
push 1
lea eax, [esp + 0x30]
push 4
push eax
mov byte [edi + 2], 0
call esi
mov ecx, dword [esp + 0x38]
push ebp
push 1
lea edx, [esp + 0x40]
push 4
push edx
mov dword [edi + 0x18], ecx
call esi
mov eax, dword [esp + 0x48]
push ebp
push 1
lea ecx, [esp + 0x50]
push 4
push ecx
mov dword [edi + 0x1c], eax
call esi
mov eax, dword [edi + 0x28]
mov edx, dword [esp + 0x58]
and al, 0xfe
mov dword [edi + 0x20], edx
mov dword [edi + 0x28], eax
mov eax, dword [esp + 0x68]
add esp, 0x44
mov dword [esp + 0x24], edi
mov dword [eax + 0x24], edi
mov eax, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x1c], eax
mov ecx, dword [ebx + 0x44]
cmp eax, ecx
jb 0x406bd1
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x2c], ebx
mov dword [ecx + 0x4c], ebx
mov eax, dword [esp + 0x10]
mov ecx, dword [0x59dba0]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jb 0x406b82
xor ebx, ebx
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
push ebx
push 0x585050
push str.ime_pysym.dat
call fcn.00406190
add esp, 0xc
cmp eax, ebx
mov dword [esp + 0x24], eax
jne 0x406d0a
mov edi, 0x59da84
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x188]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x58505c
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x18c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ime_pysym.dat
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebp, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea eax, [esp + 0x18c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
cmp eax, ebx
mov dword [esp + 0x24], eax
je 0x406edb
mov esi, dword [esp + 0x24]
lea ecx, [esp + 0x88]
push esi
push 0xff
push ecx
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
je 0x406ed1
lea edi, [esp + 0x88]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov al, byte [esp + 0x88]
not ecx
add ecx, 0xfffffffe
cmp al, 0x23
mov dword [esp + 0x10], ecx
je 0x406eae
lea eax, [esp + ecx + 0x88]
mov cl, byte [esp + ecx + 0x88]
cmp cl, 0xa
jne 0x406d69
mov byte [eax], 0
lea edx, [esp + 0x88]
mov al, byte [edx]
cmp al, 0x20
je 0x406d7a
cmp al, 9
jne 0x406d7d
inc edx
jmp 0x406d70
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x406eae
lea eax, [esp + 0x30]
lea ecx, [esp + 0x48]
push eax
push ecx
push str._s__s
push edx
call dword [sym.imp.MSVCRT.dll_sscanf]
mov eax, dword [0x59db98]
add esp, 0x10
mov ebx, eax
mov ebp, dword [eax + 0x4c]
test ebp, ebp
je 0x406dfa
lea esi, [esp + 0x48]
lea eax, [ebp + 4]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x406de1
test cl, cl
je 0x406ddd
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x406de1
add eax, 2
add esi, 2
test cl, cl
jne 0x406dbd
xor eax, eax
jmp 0x406de6
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x406df6
mov ebp, dword [ebp + 0x4c]
mov ebx, dword [ebx + 0x4c]
test ebp, ebp
jne 0x406db6
jmp 0x406dfa
test ebp, ebp
jne 0x406e56
push 0x50
call fcn.00478e60
mov ebp, eax
lea edi, [esp + 0x4c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp + 4]
mov eax, ecx
mov esi, edi
mov edi, edx
push 0x2c
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor esi, esi
mov dword [ebp + 0x48], 1
mov dword [ebp + 0x4c], esi
mov dword [ebp + 0x44], esi
call fcn.00478e60
mov dword [ebp], eax
mov dword [eax + 0x24], esi
mov dword [ebx + 0x4c], ebp
mov eax, dword [0x59dba0]
add esp, 8
inc eax
mov dword [0x59dba0], eax
jmp 0x406e5d
mov eax, dword [ebp + 0x48]
test eax, eax
je 0x406eae
push 0x2c
call fcn.00478e60
mov edx, eax
lea edi, [esp + 0x34]
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [edx + 0x24], 0
mov esi, dword [ebp + 0x44]
inc esi
mov dword [ebp + 0x44], esi
mov ebp, dword [ebp]
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x406eab
mov ebp, eax
mov eax, dword [ebp + 0x24]
test eax, eax
jne 0x406ea2
mov dword [ebp + 0x24], edx
mov esi, dword [esp + 0x24]
lea ecx, [esp + 0x88]
push esi
push 0xff
push ecx
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
jne 0x406d2d
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x378
ret