Function at 0x10006502
Capabilities:
Delete file
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x1be8]
mov eax, 0x1be8
call fcn.100860f0
push 0xffffffffffffffff
push 0x1017a9db
mov eax, dword fs:[0]
push eax
sub esp, 0xc4
mov eax, dword [0x10207390]
xor eax, ebp
mov dword [ebp + 0x1be4], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
call fcn.100052f9
mov ecx, eax
call fcn.10019947
push eax
lea ecx, [ebp]
call fcn.100015f0
lea eax, [ebp]
xor ebx, ebx
push eax
lea ecx, [ebp + 0x38]
mov dword [ebp - 4], ebx
call fcn.100035e0
lea eax, [ebp]
push eax
lea ecx, [ebp + 0x70]
mov byte [ebp - 4], 1
call fcn.100035e0
push str.LatelyCharDraw.xml
lea ecx, [ebp + 0x38]
mov byte [ebp - 4], 2
call fcn.10003640
push 0x1018628c
lea ecx, [ebp + 0x70]
call fcn.10003640
cmp dword [ebp + 0x50], 8
mov eax, dword [ebp + 0x3c]
jae 0x100065a4
lea eax, [ebp + 0x3c]
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push eax
call esi
cmp dword [ebp + 0x88], 8
mov eax, dword [ebp + 0x74]
jae 0x100065bc
lea eax, [ebp + 0x74]
push eax
call esi
lea eax, [ebp + 0x70]
push eax
lea eax, [ebp + 0x1c]
push eax
call fcn.1001e821
pop ecx
pop ecx
lea ecx, [ebp - 0xd0]
mov byte [ebp - 4], 3
call fcn.1005e8b0
push 0x38
mov byte [ebp - 4], 4
call fcn.10062191
pop ecx
mov dword [ebp - 0x14], eax
cmp eax, ebx
mov byte [ebp - 4], 5
mov esi, 0x10186288
je 0x1000660d
push 0x101ebee8
push 0x10186280
push esi
mov ecx, eax
call fcn.1005efb0
jmp 0x1000660f
xor eax, eax
push eax
lea ecx, [ebp - 0xd0]
mov byte [ebp - 4], 4
call fcn.1005dd20
push 0x50
call fcn.10062191
pop ecx
mov dword [ebp - 0x14], eax
cmp eax, ebx
mov byte [ebp - 4], 6
je 0x10006643
push 0x10186278
mov ecx, eax
call fcn.1005f490
mov dword [ebp - 0x14], eax
jmp 0x10006646
mov dword [ebp - 0x14], ebx
mov ecx, dword [ebp - 0x14]
push esi
push 0x10186270
mov byte [ebp - 4], 4
call fcn.1005f680
mov ecx, dword [edi + 0x35c]
call fcn.10042326
mov edi, eax
mov eax, dword [edi + 4]
push edi
push eax
lea ecx, [ebp - 0x24]
call fcn.10051a72
jmp 0x100068b8
lea ecx, [ebp - 0x24]
call fcn.10005225
mov esi, dword [eax]
push 0x50
call fcn.10062191
pop ecx
mov dword [ebp - 0x1c], eax
cmp eax, ebx
mov byte [ebp - 4], 7
je 0x100066a5
push str.sign
mov ecx, eax
call fcn.1005f490
mov dword [ebp - 0x1c], eax
jmp 0x100066a8
mov dword [ebp - 0x1c], ebx
push 0x10186198
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 4
call fcn.100015f0
mov eax, dword [esi]
lea ecx, [ebp - 0x88]
push ecx
lea ecx, [ebp + 0x54]
push ecx
mov ecx, esi
mov byte [ebp - 4], 8
call dword [eax + 0x18]
push ebx
push 1
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 0xa
call fcn.100017c0
push 0xf9e
lea eax, [ebp + 0xc46]
push ebx
push eax
mov word [ebp + 0xc44], bx
call fcn.10085bc0
push 0xbb7
lea eax, [ebp + 0x8d]
push ebx
push eax
mov byte [ebp + 0x8c], bl
call fcn.10085bc0
mov eax, dword [ebp + 0x58]
add esp, 0x18
cmp dword [ebp + 0x6c], 8
jae 0x10006724
lea eax, [ebp + 0x58]
push eax
lea eax, [ebp + 0xc44]
push eax
call fcn.100860cd
lea eax, [ebp + 0x8c]
push eax
lea eax, [ebp + 0xc44]
push eax
call fcn.1001c2f8
mov ecx, dword [ebp - 0x1c]
add esp, 0x10
lea eax, [ebp + 0x8c]
push eax
push 0x10186260
call fcn.1005f680
push 0x10186188
lea ecx, [ebp - 0x50]
call fcn.100015f0
mov eax, dword [esi]
lea ecx, [ebp - 0x50]
push ecx
lea ecx, [ebp - 0x6c]
push ecx
mov ecx, esi
mov byte [ebp - 4], 0xb
call dword [eax + 0x18]
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp + 0x54]
mov byte [ebp - 4], 0xc
call fcn.10001d30
push ebx
push 1
lea ecx, [ebp - 0x6c]
call fcn.100017c0
push ebx
push 1
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 0xa
call fcn.100017c0
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
jae 0x100067b1
lea eax, [ebp + 0x58]
push eax
lea eax, [ebp + 0xc44]
push eax
call fcn.100860cd
lea eax, [ebp + 0x8c]
push eax
lea eax, [ebp + 0xc44]
push eax
call fcn.1001c2f8
mov ecx, dword [ebp - 0x1c]
add esp, 0x10
lea eax, [ebp + 0x8c]
push eax
push str.height
call fcn.1005f680
push str.content
lea ecx, [ebp - 0x50]
call fcn.100015f0
mov eax, dword [esi]
lea ecx, [ebp - 0x50]
push ecx
lea ecx, [ebp - 0x6c]
push ecx
mov ecx, esi
mov byte [ebp - 4], 0xd
call dword [eax + 0x18]
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp + 0x54]
mov byte [ebp - 4], 0xe
call fcn.10001d30
push ebx
push 1
lea ecx, [ebp - 0x6c]
call fcn.100017c0
push ebx
push 1
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 0xa
call fcn.100017c0
cmp dword [ebp + 0x6c], 8
mov eax, dword [ebp + 0x58]
jae 0x1000683e
lea eax, [ebp + 0x58]
push eax
lea eax, [ebp + 0xc44]
push eax
call fcn.100860cd
lea eax, [ebp + 0x8c]
push eax
lea eax, [ebp + 0xc44]
push eax
call fcn.1001c2f8
push 0x30
call fcn.10062191
add esp, 0x14
mov dword [ebp - 0x34], eax
cmp eax, ebx
mov byte [ebp - 4], 0xf
je 0x10006883
lea ecx, [ebp + 0x8c]
push ecx
mov ecx, eax
call fcn.10004e0b
jmp 0x10006885
xor eax, eax
mov ecx, dword [ebp - 0x1c]
push eax
mov byte [ebp - 4], 0xa
mov byte [eax + 0x2c], 1
call fcn.1005dd20
push dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x14]
call fcn.1005dd20
push ebx
push 1
lea ecx, [ebp + 0x54]
mov byte [ebp - 4], 4
call fcn.100017c0
lea ecx, [ebp - 0x24]
call fcn.10012ca6
mov eax, dword [edi + 8]
push edi
push eax
lea ecx, [ebp - 0x2c]
call fcn.10051a72
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x24]
call fcn.10054d99
test al, al
je 0x10006677
push dword [ebp - 0x14]
lea ecx, [ebp - 0xd0]
call fcn.1005dd20
cmp dword [ebp + 0x34], 0x10
mov eax, dword [ebp + 0x20]
jae 0x100068f3
lea eax, [ebp + 0x20]
push eax
lea ecx, [ebp - 0xd0]
call fcn.1005ec40
cmp dword [ebp + 0x88], 8
mov eax, dword [ebp + 0x74]
mov dword [ebp - 0x18], ebx
jae 0x10006911
lea eax, [ebp + 0x74]
push ebx
push 0x80
push 4
push ebx
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x1000693a
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
inc eax
push eax
call fcn.100621c1
mov esi, eax
mov eax, dword [ebp - 0x18]
inc eax
push eax
push ebx
push esi
call fcn.10085bc0
add esp, 0x10
push ebx
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x18]
inc eax
push eax
push esi
push edi
mov dword [ebp - 0x30], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x18]
xor ecx, ecx
push 2
inc eax
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.100621c1
mov edi, eax
mov eax, dword [ebp - 0x18]
lea eax, [eax + eax + 2]
push eax
push ebx
push edi
call fcn.10085bc0
push edi
push esi
call fcn.1001c2cf
mov eax, dword [ebp - 0x18]
inc eax
push eax
push ebx
push esi
call fcn.10085bc0
mov eax, dword [ebp - 0x18]
lea eax, [eax + eax + 1]
push eax
call fcn.100621c1
mov ecx, dword [ebp - 0x18]
lea ecx, [ecx + ecx + 1]
push ecx
push ebx
push eax
mov dword [ebp - 0x1c], eax
call fcn.10085bc0
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x1c]
push edi
call fcn.1001c326
mov eax, dword [ebp + 0x3c]
add esp, 0x40
cmp dword [ebp + 0x50], 8
jae 0x100069e8
lea eax, [ebp + 0x3c]
push 0x10186250
push eax
call fcn.10086090
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0x14], eax
je 0x10006a54
push eax
push 1
lea eax, [ebp - 0xd]
push 1
push eax
mov byte [ebp - 0xd], 0xef
call fcn.10085f48
push dword [ebp - 0x14]
lea eax, [ebp - 0xd]
push 1
push 1
push eax
mov byte [ebp - 0xd], 0xbb
call fcn.10085f48
push dword [ebp - 0x14]
lea eax, [ebp - 0xd]
push 1
push 1
push eax
mov byte [ebp - 0xd], 0xbf
call fcn.10085f48
push dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
dec eax
push eax
push 1
push dword [ebp - 0x1c]
call fcn.10085f48
add esp, 0x40
push dword [ebp - 0x14]
call fcn.10085d6d
pop ecx
push esi
call fcn.100621bc
push edi
call fcn.100621bc
push dword [ebp - 0x1c]
call fcn.100621bc
mov eax, dword [ebp + 0x74]
add esp, 0xc
cmp dword [ebp + 0x88], 8
jae 0x10006a7a
lea eax, [ebp + 0x74]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0xd0]
mov byte [ebp - 4], 3
call fcn.10005414
xor esi, esi
push ebx
inc esi
push esi
lea ecx, [ebp + 0x1c]
call fcn.10001770
push ebx
push esi
lea ecx, [ebp + 0x70]
call fcn.100017c0
push ebx
push esi
lea ecx, [ebp + 0x38]
call fcn.100017c0
push ebx
push esi
lea ecx, [ebp]
call fcn.100017c0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x1be4]
xor ecx, ebp
call fcn.1008545e
add ebp, 0x1be8
leave
ret