Function at 0x41de18
Capabilities:
Get common file path
Set current directory
Write file on windows

Disassembly:
push ebp
sub esp, 0x534
lea ebp, [esp - 4]
mov eax, dword [0x4cb598]
xor eax, ebp
mov dword [ebp + 0x534], eax
push 0x38
mov eax, 0x4a11a0
call fcn.00475cc9
xor edi, edi
mov esi, ecx
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x30], edi
call fcn.0044bc9f
push eax
lea ecx, [ebp - 0x28]
call fcn.0044be7a
push str.font_unic.txt
lea ecx, [ebp - 0x24]
mov dword [ebp - 4], edi
call fcn.004041b8
push ecx
lea eax, [ebp - 0x24]
mov dword [ebp - 0x40], esp
mov ecx, esp
push eax
mov byte [ebp - 4], 1
call fcn.004013f7
mov ecx, esi
call fcn.0041d8b6
cmp eax, edi
jne 0x41debe
call fcn.0044bc9f
push eax
lea ecx, [ebp - 0x10]
call fcn.0044be7a
push dword [ebp - 0x24]
lea eax, [ebp - 0x10]
push 0xf0aa
push eax
mov byte [ebp - 4], 2
call fcn.004173ac
mov esi, dword [ebp - 0x10]
add esp, 0xc
push edi
push edi
push esi
call fcn.004535b7
lea ecx, [esi - 0x10]
jmp 0x41e415
lea eax, [ebp]
push eax
mov edi, 0x200
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0x400
call fcn.00476994
pop ecx
push edi
mov ebx, eax
push ebx
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push ebx
lea ecx, [ebp - 0x20]
call fcn.00401835
push 0x5c
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 3
call fcn.004054ff
push eax
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x20]
call fcn.00408ffd
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 4
call fcn.004015a6
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
mov byte [ebp - 4], 3
call fcn.004010ea
push ebx
call fcn.00478435
pop ecx
push dword [ebp - 0x20]
mov dword [esi + 0x1c], edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push str.Fonttool
push dword [esi + 0x44596d6]
mov ecx, esi
call fcn.00418266
push 0x4abefc
push dword [esi + 0x44596d6]
mov ecx, esi
call fcn.00418266
push str.TempFont.txt
push dword [esi + 0x44596d6]
mov ecx, esi
call fcn.00418266
cmp dword [esi + 0x4459682], 0x2100000
jae 0x41e1b8
push 0x4abee8
push dword [esi + 0x44596d6]
mov ecx, esi
call fcn.00418266
cmp dword [esi + 0x44541fe], edi
mov dword [ebp - 0x10], edi
jle 0x41e1a8
lea edi, [esi + 0x4454502]
mov eax, dword [ebp - 0x10]
inc eax
push eax
mov dword [ebp - 0x14], eax
lea eax, [ebp + 0x4c8]
push 0x4a7b38
push eax
call fcn.004134f0
lea eax, [ebp + 0x4c8]
push 0x4ab950
push eax
call fcn.0047624f
push eax
lea eax, [ebp + 0x400]
push eax
call fcn.00476279
add esp, 0x1c
push 0x4a8c48
lea ecx, [ebp - 0x2c]
call fcn.004041b8
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x40]
push eax
mov byte [ebp - 4], 5
call fcn.00406c99
lea ecx, [ebp + 0x400]
push ecx
push eax
lea eax, [ebp - 0x44]
push eax
mov byte [ebp - 4], 6
call fcn.00406cf0
add esp, 0x18
push eax
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 7
call fcn.004015a6
mov ecx, dword [ebp - 0x44]
add ecx, 0xfffffff0
call fcn.004010ea
mov ecx, dword [ebp - 0x40]
add ecx, 0xfffffff0
call fcn.004010ea
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
mov byte [ebp - 4], 3
call fcn.004010ea
push 0x4abec8
push dword [ebp - 0x28]
call fcn.00478a96
pop ecx
mov dword [ebp - 0x1c], eax
mov eax, dword [edi]
pop ecx
mov ecx, dword [eax + 0xd]
mov ecx, dword [ecx + 0x18]
mov dword [ebp - 0x18], ecx
mov eax, dword [eax + 9]
push 0x18
pop ebx
sub eax, 8
cmp eax, ebx
jbe 0x41e12d
test ecx, ecx
je 0x41e12d
mov eax, dword [edi]
mov eax, dword [eax + 0xd]
add eax, ebx
push 6
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.004765e0
xor eax, eax
inc eax
add esp, 0xc
cmp word [ebp - 0x38], ax
jne 0x41e0c6
push dword [ebp - 0x1c]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x34], eax
call fcn.00478828
mov eax, dword [edi]
mov eax, dword [eax + 0xd]
and dword [ebp - 0x1c], 0
pop ecx
add eax, ebx
push eax
mov ecx, esi
call fcn.004183a8
cmp word [ebp - 0x38], 2
jne 0x41e111
cmp dword [ebp - 0x3c], 0
je 0x41e111
cmp dword [ebp - 0x30], 0
je 0x41e0f3
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 0x34], eax
jne 0x41e0f3
push 0x4abec8
push dword [ebp - 0x28]
call fcn.00478a96
pop ecx
pop ecx
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x41e111
push dword [ebp - 0x1c]
mov eax, dword [edi]
mov eax, dword [eax + 0xd]
push 1
push dword [ebp - 0x3c]
add eax, ebx
push eax
call fcn.00479f37
add esp, 0x10
add ebx, dword [ebp - 0x18]
mov eax, dword [edi]
mov ecx, dword [eax + 0xd]
mov ecx, dword [ebx + ecx]
mov dword [ebp - 0x18], ecx
mov eax, dword [eax + 9]
sub eax, 8
cmp ebx, eax
jb 0x41e07a
and dword [ebp - 0x3c], 0
cmp dword [ebp - 0x1c], 0
mov word [ebp - 0x38], 2
je 0x41e191
push dword [ebp - 0x1c]
lea eax, [ebp - 0x3c]
push 1
push 6
push eax
call fcn.00479f37
push dword [ebp - 0x1c]
call fcn.00478828
push dword [ebp - 0x14]
lea eax, [ebp + 0x52c]
push 0x4abee4
push eax
call fcn.00478f88
lea eax, [ebp + 0x52c]
push str..hpk
push eax
call fcn.00479140
add esp, 0x28
lea eax, [ebp + 0x52c]
push eax
push dword [esi + 0x44596d6]
mov ecx, esi
call fcn.00418266
mov eax, dword [ebp - 0x14]
add edi, 4
cmp eax, dword [esi + 0x44541fe]
mov dword [ebp - 0x10], eax
jl 0x41dfa6
xor edi, edi
cmp dword [esi + 0x4459682], 0x2100000
jb 0x41e2c0
push 0x4abed8
push dword [esi + 0x44596d6]
mov ecx, esi
call fcn.00418266
push 0x4abed4
push dword [esi + 0x44596d6]
mov ecx, esi
call fcn.00418266
cmp dword [esi + 0x44541fe], edi
mov dword [ebp - 0x10], edi
jle 0x41e2c0
lea edi, [esi + 0x4454502]
cmp dword [ebp - 0x30], 0
jne 0x41e2a9
push 0x18
pop ebx
push 4
lea eax, [ebp - 0x18]
push 0
push eax
call fcn.004762a0
mov eax, dword [edi]
mov eax, dword [eax + 0xd]
add eax, ebx
push 3
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.004765e0
mov eax, dword [edi]
mov eax, dword [eax + 9]
sub eax, 8
add esp, 0x18
cmp eax, ebx
jbe 0x41e2a9
cmp dword [ebp - 0x18], 0
je 0x41e2a9
mov eax, dword [edi]
mov eax, dword [eax + 0xd]
add eax, ebx
push 4
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.004765e0
mov eax, dword [ebp - 0x40]
shr eax, 0x18
add esp, 0xc
cmp eax, 5
je 0x41e28d
cmp eax, 7
je 0x41e28d
add ebx, dword [ebp - 0x18]
push 4
lea eax, [ebp - 0x18]
push 0
push eax
call fcn.004762a0
mov eax, dword [edi]
mov eax, dword [eax + 0xd]
add eax, ebx
push 3
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.004765e0
mov eax, dword [edi]
mov eax, dword [eax + 9]
sub eax, 8
add esp, 0x18
cmp ebx, eax
jb 0x41e22d
jmp 0x41e2a9
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x34], eax
mov eax, dword [edi]
mov eax, dword [eax + 0xd]
add eax, ebx
push eax
mov ecx, esi
mov dword [ebp - 0x30], 1
call fcn.004183a8
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
add edi, 4
cmp eax, dword [esi + 0x44541fe]
jl 0x41e1f1
xor edi, edi
push 0x4abed0
push dword [esi + 0x44596d6]
mov ecx, esi
call fcn.00418266
push str.fontfile.bin
push dword [esi + 0x44596d6]
mov ecx, esi
call fcn.00418266
mov ecx, esi
call fcn.004182a5
lea eax, [esi + 0x4459686]
push eax
push dword [esi + 0x44596d6]
call fcn.0041653e
pop ecx
pop ecx
mov ecx, esi
mov ebx, eax
call fcn.00418223
cmp ebx, edi
mov ecx, esi
je 0x41e365
call fcn.004186d4
call fcn.0044bc9f
push eax
lea ecx, [ebp - 0x10]
call fcn.0044be7a
cmp ebx, 8
mov byte [ebp - 4], 8
jne 0x41e340
push dword [ebp - 0x24]
lea eax, [ebp - 0x10]
push 0xf0a9
push eax
call fcn.004173ac
add esp, 0xc
jmp 0x41e34d
push 0xe004
lea ecx, [ebp - 0x10]
call fcn.00401566
mov esi, dword [ebp - 0x10]
push edi
push edi
push esi
call fcn.004535b7
lea ecx, [esi - 0x10]
call fcn.004010ea
jmp 0x41e40f
cmp dword [ebp - 0x30], edi
push dword [ebp - 0x34]
je 0x41e392
call fcn.00419d4e
cmp eax, edi
mov dword [ebp - 0x2c], eax
je 0x41e3d0
call fcn.0044bc9f
push eax
lea ecx, [ebp - 0x14]
call fcn.0044be7a
mov byte [ebp - 4], 9
push 0xf00e
jmp 0x41e3b5
call fcn.0041a174
cmp eax, edi
mov dword [ebp - 0x2c], eax
je 0x41e3d0
call fcn.0044bc9f
push eax
lea ecx, [ebp - 0x14]
call fcn.0044be7a
mov byte [ebp - 4], 0xa
push 0xf00f
lea ecx, [ebp - 0x14]
call fcn.00401566
mov ebx, dword [ebp - 0x14]
push edi
push edi
push ebx
call fcn.004535b7
lea ecx, [ebx - 0x10]
call fcn.004010ea
lea ebx, [esi + 0xd2f0f8]
mov eax, dword [ebx]
cmp eax, edi
mov dword [esi + 0x18], 1
je 0x41e3ec
push eax
call fcn.00478435
pop ecx
mov dword [ebx], edi
cmp dword [ebp - 0x2c], edi
jne 0x41e3f8
mov dword [esi + 0x1c], 1
mov ecx, esi
call fcn.004186d4
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov dword [esi + 0xf4], edi
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.004010ea
mov ecx, dword [ebp - 0x24]
add ecx, 0xfffffff0
call fcn.004010ea
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
call fcn.004010ea
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x534]
xor ecx, ebp
call fcn.00475cba
add ebp, 0x538
leave
ret