Function at 0x438c80
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
xor eax, eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
mov word [ebp - 0x2c], ax
mov word [ebp - 0x26], ax
mov word [ebp - 0x28], ax
mov word [ebp - 0x22], ax
mov word [ebp - 0x24], ax
mov word [ebp - 0x20], ax
mov al, byte [edi + 0x2c]
cmp al, 0x20
mov ecx, 1
mov word [ebp - 0x2a], cx
mov word [ebp - 0x1e], cx
mov byte [ebp - 8], al
jae 0x438cc4
mov byte [ebp - 8], 0x20
mov al, byte [edi + 0x2d]
mov ecx, dword [ebp + 0xc]
mov byte [ebp - 4], al
mov ebx, dword [ebp - 4]
mov eax, dword [ebp - 8]
lea esi, [ecx + ecx*2]
and eax, 0xff
shl esi, 4
and ebx, 0xff
add esi, ecx
lea ecx, [eax + eax*2]
lea edx, [ebx + ebx*2 + 3]
sub edx, ecx
push 4
push edx
mov dword [ebp - 0x1c], ebx
mov dword [ebp + 0x10], eax
shl esi, 1
call dword [sym.imp.MSVCRT.dll_calloc]
mov ecx, dword [0x49e964]
mov dword [esi + ecx + 0x56], eax
mov edx, dword [0x49e964]
mov ecx, dword [esi + edx + 0x56]
add esp, 8
test ecx, ecx
jne 0x438d24
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
sub ebx, dword [ebp + 0x10]
lea eax, [ebx*4 + 4]
add ecx, eax
mov dword [esi + edx + 0x5a], ecx
mov ecx, dword [0x49e964]
mov edx, dword [esi + ecx + 0x5a]
add edx, eax
mov dword [esi + ecx + 0x5e], edx
mov eax, dword [0x4a4b28]
lea ecx, [eax + eax*4]
lea eax, [eax + ecx*2]
lea edx, [eax + eax*4]
mov eax, dword [0x49e968]
mov cx, word [eax + edx*2 + 0x40]
mov edx, dword [0x49e964]
mov eax, dword [ebp + 0x14]
mov word [esi + edx + 0x3e], cx
mov ecx, dword [0x49e964]
push 0x3c
push eax
lea edx, [esi + ecx]
push edx
call sub.MSVCRT.dll_memcpy
mov eax, dword [0x49e964]
mov cl, byte [ebp - 8]
mov byte [esi + eax + 0x3c], cl
mov edx, dword [0x49e964]
mov al, byte [ebp - 4]
mov byte [esi + edx + 0x3d], al
mov edx, dword [ebp + 0x14]
mov ecx, dword [0x49e964]
lea eax, [edx + 0x3c]
push eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x90]
push eax
mov dword [esi + ecx + 0x46], 0x41600000
call sub.MSVCRT.dll_strcpy
mov ecx, dword [0x49e964]
add esp, 0x14
cmp word [esi + ecx + 0x3e], 0x42
jg 0x438e09
call dword [sym.imp.KERNEL32.dll_GetSystemDefaultLangID]
cmp ax, 0x40c
jne 0x438e09
push 0x40
push str._Bold
lea edx, [ebp - 0x90]
push str._Gras
push edx
call fcn.004078c0
push 0x40
push str._Italic
lea eax, [ebp - 0x90]
push str._Italique
push eax
call fcn.004078c0
add esp, 0x20
mov edx, dword [0x49e964]
lea ecx, [ebp - 0x90]
push ecx
lea eax, [esi + edx + 0x1c]
push eax
mov byte [ebp - 0x71], 0
call sub.MSVCRT.dll_strcpy
mov ecx, dword [edi + 0x40]
mov edx, dword [0x49e964]
mov dword [esi + edx], ecx
mov eax, dword [edi + 0x44]
mov ecx, dword [0x49e964]
mov dword [esi + ecx + 4], eax
mov eax, dword [edi + 0x40]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 0
fild qword [ebp - 0x10]
add esp, 8
fild dword [edi]
fdivr st(1)
fstp dword [ebp - 4]
fild dword [edi + 0x14]
fmul dword [ebp - 4]
fadd qword [0x475670]
call sub.MSVCRT.dll__ftol
mov edx, dword [0x49e964]
fld dword [esi + edx + 0x46]
mov dword [ebp + 0xc], eax
fdiv st(1)
fstp dword [ebp + 0x14]
fstp st(0)
fild dword [edi + 8]
fmul dword [ebp - 4]
fadd qword [0x475670]
call sub.MSVCRT.dll__ftol
mov dword [ebp - 0x10], eax
mov eax, dword [0x49e964]
mov dword [ebp - 0xc], 0
fild qword [ebp - 0x10]
fmul dword [ebp + 0x14]
fstp dword [esi + eax + 0x4a]
mov cl, byte [edi + 0x33]
mov edx, dword [0x49e964]
mov byte [esi + edx + 0x44], cl
mov eax, dword [0x4a4b28]
lea ecx, [eax + eax*4]
lea eax, [eax + ecx*2]
lea edx, [eax + eax*4]
mov eax, dword [0x49e968]
mov ecx, dword [eax + edx*2 + 0x62]
mov edx, dword [0x49e964]
mov dword [esi + edx + 0x52], ecx
mov eax, dword [0x4a4b28]
lea ecx, [eax + eax*4]
lea eax, [eax + ecx*2]
lea edx, [eax + eax*4]
mov eax, dword [0x49e968]
mov cl, byte [eax + edx*2 + 0x66]
mov edx, dword [0x49e964]
mov byte [esi + edx + 0x45], cl
mov eax, dword [0x49e964]
cmp word [esi + eax + 0x3e], 0
jne 0x438f23
mov dl, byte [esi + eax + 0x45]
cmp dl, 2
lea ecx, [esi + eax + 0x45]
jl 0x438f17
mov byte [ecx], 0
mov eax, dword [0x49e964]
cmp word [esi + eax + 0x3e], 0
je 0x4391cc
mov eax, dword [ebp - 8]
push str.Courier_New
push eax
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
je 0x4391c7
mov eax, dword [0x4a4b28]
lea ecx, [eax + eax*4]
lea eax, [eax + ecx*2]
lea edx, [eax + eax*4]
mov eax, dword [0x49e968]
lea ecx, [eax + edx*2]
mov eax, dword [ecx + 0x66]
cmp eax, 1
je 0x4391c7
cmp eax, 2
je 0x4391c7
cmp eax, 3
jne 0x438f95
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], 0
fild qword [ebp - 0x10]
mov eax, dword [ecx + 0x6a]
mov ecx, dword [0x49e964]
mov dword [esi + ecx + 0x40], eax
fdivr qword [0x4757d0]
fstp dword [ebp + 0x14]
jmp 0x438fab
fld dword [0x47ce28]
mov edx, dword [0x49e964]
fmul dword [ebp + 0x14]
fst dword [ebp + 0x14]
fstp dword [esi + edx + 0x40]
mov eax, dword [ebp + 0xc]
mov ecx, dword [0x49e964]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 0
fild qword [ebp - 0x10]
fmul dword [ebp + 0x14]
fstp dword [esi + ecx + 0x4e]
mov edx, dword [0x49e964]
movsx eax, word [esi + edx + 0x3e]
push eax
push 0xb
call fcn.00410630
add esp, 4
push eax
lea ecx, [ebp - 0x3c]
push str._s._03d
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edx, [ebp - 0x20c]
push 0x4c7f00
push edx
call sub.MSVCRT.dll_strcpy
lea eax, [ebp - 0x3c]
push eax
lea ecx, [ebp - 0x20c]
push ecx
call sub.MSVCRT.dll_strcat
push 0x20
lea edx, [ebp - 0x20c]
push 0x47ce6c
push edx
call dword [sym.imp.MSVCRT.dll__fsopen]
mov edi, eax
add esp, 0x2c
test edi, edi
jne 0x439046
push 0x20
lea eax, [ebp - 0x3c]
push 0x47ce70
push eax
call dword [sym.imp.MSVCRT.dll__fsopen]
mov edi, eax
add esp, 0xc
test edi, edi
je 0x439087
mov eax, dword [ebp + 0x10]
lea ecx, [eax + eax*2]
mov eax, dword [ebp - 0x1c]
lea edx, [eax + eax*2 + 3]
mov eax, dword [0x49e964]
push edi
shl ecx, 2
shl edx, 2
sub edx, ecx
mov ecx, dword [esi + eax + 0x56]
push 1
push edx
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
push edi
mov dword [ebp + 0xc], eax
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [ebp + 0xc]
add esp, 0x14
test eax, eax
jne 0x439231
mov edx, dword [0x49e964]
lea eax, [esi + edx]
push eax
call dword [sym.imp.GDI32.dll_CreateFontIndirectA]
mov ecx, dword [ebp + 8]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
xor edi, edi
test ebx, ebx
mov dword [ebp - 0xc], eax
jl 0x43913a
mov edx, dword [ebp + 0x10]
mov dword [ebp + 0xc], edx
mov edx, dword [ebp + 0xc]
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp + 8]
push 0
push 0
lea ecx, [ebp - 0x50]
push ecx
push 0
push edx
push eax
call dword [sym.imp.GDI32.dll_GetGlyphOutlineA]
movsx eax, word [ebp - 0x40]
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x18], eax
mov edx, eax
sub edx, dword [ebp - 0x50]
mov eax, dword [0x49e964]
sub edx, ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], ecx
mov ecx, dword [esi + eax + 0x56]
fild qword [ebp - 0x18]
mov dword [ebp - 8], edx
inc edi
fmul dword [ebp + 0x14]
fstp dword [ecx + edi*4 - 4]
mov edx, dword [0x49e964]
fild dword [ebp - 4]
mov eax, dword [esi + edx + 0x5a]
fmul dword [ebp + 0x14]
fstp dword [eax + edi*4 - 4]
mov ecx, dword [0x49e964]
fild dword [ebp - 8]
mov edx, dword [esi + ecx + 0x5e]
mov ecx, dword [ebp + 0xc]
inc ecx
cmp edi, ebx
fmul dword [ebp + 0x14]
mov dword [ebp + 0xc], ecx
fstp dword [edx + edi*4 - 4]
jle 0x4390b5
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 8]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ebx, dword [sym.imp.MSVCRT.dll__fsopen]
push 0x10
lea edx, [ebp - 0x20c]
push 0x47ce74
push edx
call ebx
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x439188
push 0x10
lea eax, [ebp - 0x3c]
push 0x47ce78
push eax
call ebx
mov edi, eax
add esp, 0xc
test edi, edi
je 0x439231
mov eax, dword [ebp + 0x10]
lea ecx, [eax + eax*2]
mov eax, dword [ebp - 0x1c]
lea edx, [eax + eax*2 + 3]
mov eax, dword [0x49e964]
push edi
shl ecx, 2
shl edx, 2
sub edx, ecx
mov ecx, dword [esi + eax + 0x56]
push 1
push edx
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x49e964]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], 0
fild qword [ebp - 0x18]
mov dword [esi + eax + 0x4e], 0x41000000
mov eax, dword [0x49e964]
fdivr qword [0x4757d0]
fstp dword [esi + eax + 0x40]
xor eax, eax
test ebx, ebx
jl 0x439231
mov ecx, dword [0x49e964]
mov edx, dword [esi + ecx + 0x56]
mov dword [edx + eax*4], 0x41000000
mov ecx, dword [0x49e964]
mov edx, dword [esi + ecx + 0x5a]
mov dword [edx + eax*4], 0
mov ecx, dword [0x49e964]
mov edx, dword [esi + ecx + 0x5e]
mov dword [edx + eax*4], 0
inc eax
cmp eax, ebx
jle 0x4391f9
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret