Function at 0x401fa0
Capabilities:
Create directory
Get common file path
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43e3e6
mov eax, dword fs:[0]
push eax
sub esp, 0x26c
mov eax, dword [0x458504]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x278]
xorps xmm0, xmm0
xor edi, edi
movlpd qword [ebp - 0x278], xmm0
push eax
mov dword [ebp - 0x264], edi
call dword [sym.imp.MSVCR120.dll__time64]
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call sub.MSVCR120.dll_memset
add esp, 0x10
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, dword [sym.imp.MSVCR120.dll_wcsncat_s]
lea eax, [ebp - 0x218]
push 0xffffffffffffffff
push str.leidian_
push 0x104
push eax
call esi
add esp, 0x10
lea eax, [ebp - 0x218]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push 0xffffffffffffffff
push str.history.txt
lea eax, [ebp - 0x218]
push 0x104
push eax
call esi
add esp, 0x10
lea eax, [ebp - 0x218]
push edi
push edi
push 3
push edi
push 3
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x268], eax
cmp eax, 0xffffffff
je 0x4022f3
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
lea eax, [esi + 2]
push eax
call fcn.0041ff0d
add esp, 4
mov dword [ebp - 0x270], edi
mov ebx, eax
lea eax, [ebp - 0x270]
mov dword [ebp - 0x26c], ebx
push edi
push eax
push esi
push ebx
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x270]
xor ecx, ecx
shr eax, 1
mov word [ebx + eax*2], cx
mov eax, ebx
cmp word [eax], cx
je 0x4022de
lea ecx, [ecx]
xor eax, eax
mov dword [ebp - 0x21c], 7
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], ax
push 0xd
push ebx
mov dword [ebp - 4], eax
call dword [sym.imp.MSVCR120.dll_wcschr]
mov esi, eax
add esp, 8
test esi, esi
je 0x402128
sub eax, ebx
lea ecx, [ebp - 0x230]
sar eax, 1
push eax
push ebx
call fcn.00403350
lea ebx, [esi + 4]
jmp 0x40215c
cmp word [ebx], 0
jne 0x402132
xor eax, eax
jmp 0x402146
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x402137
sub eax, edx
sar eax, 1
push eax
push ebx
lea ecx, [ebp - 0x230]
call fcn.00403350
mov eax, dword [ebp - 0x220]
lea ebx, [ebx + eax*2]
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
push 0x44385c
cmovae eax, dword [ebp - 0x230]
push eax
lea eax, [ebp - 0x248]
push eax
call fcn.00402320
cmp dword [ebp - 0x21c], 8
lea eax, [ebp - 0x230]
push 0x443868
cmovae eax, dword [ebp - 0x230]
push eax
lea eax, [ebp - 0x260]
mov byte [ebp - 4], 1
push eax
call fcn.00402320
add esp, 0x18
cmp dword [ebp - 0x238], 0
je 0x402248
cmp dword [ebp - 0x250], 0
je 0x402248
cmp dword [ebp - 0x234], 8
lea eax, [ebp - 0x248]
push 0
cmovae eax, dword [ebp - 0x248]
push 0
push eax
call dword [sym.imp.MSVCR120.dll__wcstoi64]
cmp dword [ebp - 0x24c], 8
mov esi, eax
push 0
lea eax, [ebp - 0x260]
mov edi, edx
cmovae eax, dword [ebp - 0x260]
push 0
push eax
call dword [sym.imp.MSVCR120.dll_wcstoul]
mov ecx, dword [ebp - 0x278]
add esp, 0x18
mov edx, eax
sub ecx, esi
mov eax, dword [ebp - 0x274]
sbb eax, edi
test eax, eax
jg 0x402242
jl 0x40222e
cmp ecx, 0x15180
ja 0x402242
mov edi, dword [ebp - 0x264]
cmp edx, dword [ebp + 8]
jne 0x402248
inc edi
mov dword [ebp - 0x264], edi
jmp 0x402248
mov edi, dword [ebp - 0x264]
cmp dword [ebp - 0x24c], 8
jb 0x40225f
push dword [ebp - 0x260]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
mov dword [ebp - 0x24c], 7
cmp dword [ebp - 0x234], 8
mov dword [ebp - 0x250], 0
mov word [ebp - 0x260], ax
jb 0x402293
push dword [ebp - 0x248]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
mov dword [ebp - 0x234], 7
cmp dword [ebp - 0x21c], 8
mov dword [ebp - 0x238], 0
mov word [ebp - 0x248], ax
mov dword [ebp - 4], 0xffffffff
jb 0x4022ce
push dword [ebp - 0x230]
call sub.MSVCR120.dll_void___cdecl_operator_delete_void__
add esp, 4
cmp word [ebx], 0
jne 0x4020e0
mov eax, dword [ebp - 0x26c]
push eax
call sub.MSVCR120.dll_void___cdecl_operator_delete___void__
add esp, 4
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0043d084
mov esp, ebp
pop ebp
ret