Function at 0x413ef3
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
and byte [ebp - 1], 0
push ebx
push esi
push edi
push 0x4422d8
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp - 8], eax
test eax, eax
pop ecx
jne 0x413f26
mov dword [0x445210], str.file_open_failed.
jmp 0x4145ac
push 0x34
call dword [sym.imp.MSVCRT.dll_malloc]
mov esi, eax
pop ecx
test esi, esi
jne 0x413f44
mov dword [0x445210], str.out_of_memory.
jmp 0x414568
push dword [ebp - 8]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
xor eax, eax
push 4
push 1
mov dword [esi], eax
mov dword [esi + 0x24], eax
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], eax
mov dword [esi + 0x20], eax
pop ebx
lea eax, [ebp - 0x24]
push ebx
push eax
call edi
add esp, 0x10
cmp eax, 4
jne 0x41455e
push eax
lea eax, [ebp - 0x24]
push 0x4422ac
push eax
call dword [sym.imp.MSVCRT.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x41455e
push dword [ebp - 8]
lea eax, [ebp - 0x18]
push ebx
push 4
push eax
call edi
add esp, 0x10
cmp eax, ebx
jne 0x41455e
cmp dword [ebp - 0x18], 0x12345678
jne 0x413fb6
and dword [ebp + 8], 0
jmp 0x413fc6
cmp dword [ebp - 0x18], 0x78563412
jne 0x41455e
mov dword [ebp + 8], ebx
push dword [ebp - 8]
lea eax, [ebp - 0x10]
push ebx
push 4
push eax
call edi
add esp, 0x10
cmp eax, ebx
je 0x413fe8
mov dword [0x445210], str.premature_end_of_file.
jmp 0x414568
push dword [ebp - 8]
lea eax, [esi + 4]
push ebx
push 4
push eax
call edi
add esp, 0x10
cmp eax, ebx
jne 0x413fd9
push dword [ebp - 8]
lea eax, [esi + 8]
push ebx
push 4
push eax
call edi
add esp, 0x10
cmp eax, ebx
jne 0x413fd9
push dword [ebp - 8]
lea eax, [esi + 0xc]
push ebx
push 4
push eax
call edi
add esp, 0x10
cmp eax, ebx
jne 0x413fd9
push dword [ebp - 8]
lea ebx, [esi + 0x10]
push 1
push 4
push ebx
call edi
add esp, 0x10
cmp eax, 1
jne 0x413fd9
push dword [ebp - 8]
lea edi, [esi + 0x14]
push eax
push 4
push edi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x413fd9
cmp dword [ebp + 8], 0
je 0x4140e4
mov al, byte [ebp - 0x10]
mov cl, byte [ebp - 0xd]
mov byte [ebp - 0x10], cl
mov cl, byte [ebp - 0xe]
mov byte [ebp - 0xd], al
mov al, byte [ebp - 0xf]
mov byte [ebp - 0xf], cl
mov byte [ebp - 0xe], al
mov al, byte [esi + 4]
mov cl, byte [esi + 7]
mov byte [esi + 4], cl
mov cl, byte [esi + 6]
mov byte [esi + 7], al
mov al, byte [esi + 5]
mov byte [esi + 5], cl
mov cl, byte [esi + 0xb]
mov byte [esi + 6], al
mov al, byte [esi + 8]
mov byte [esi + 8], cl
mov cl, byte [esi + 0xa]
mov byte [esi + 0xb], al
mov al, byte [esi + 9]
mov byte [esi + 9], cl
mov cl, byte [esi + 0xf]
mov byte [esi + 0xa], al
mov al, byte [esi + 0xc]
mov byte [esi + 0xc], cl
mov cl, byte [esi + 0xe]
mov byte [esi + 0xf], al
mov al, byte [esi + 0xd]
mov byte [esi + 0xd], cl
mov cl, byte [esi + 0x13]
mov byte [esi + 0xe], al
mov al, byte [ebx]
mov byte [ebx], cl
mov cl, byte [esi + 0x12]
mov byte [esi + 0x13], al
mov al, byte [esi + 0x11]
mov byte [esi + 0x11], cl
mov cl, byte [esi + 0x17]
mov byte [esi + 0x12], al
mov al, byte [edi]
mov byte [edi], cl
mov cl, byte [esi + 0x16]
mov byte [esi + 0x17], al
mov al, byte [esi + 0x15]
mov byte [esi + 0x15], cl
mov byte [esi + 0x16], al
mov eax, dword [edi]
lea eax, [eax + eax*2]
shl eax, 2
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
xor ebx, ebx
pop ecx
cmp eax, ebx
mov dword [esi + 0x24], eax
je 0x413f35
push dword [ebp - 8]
push dword [edi]
push 0xc
push eax
call dword [sym.imp.MSVCRT.dll_fread]
mov ecx, dword [edi]
add esp, 0x10
cmp eax, ecx
jne 0x413fd9
cmp dword [ebp + 8], ebx
je 0x414176
cmp ecx, ebx
mov dword [ebp - 0xc], ebx
jle 0x414176
xor eax, eax
mov ecx, dword [esi + 0x24]
add ecx, eax
mov bl, byte [ecx + 1]
mov dl, byte [ecx]
mov byte [ecx], bl
mov ecx, dword [esi + 0x24]
mov byte [ecx + eax + 1], dl
mov ecx, dword [esi + 0x24]
add ecx, eax
mov bl, byte [ecx + 9]
mov dl, byte [ecx + 8]
mov byte [ecx + 8], bl
mov ecx, dword [esi + 0x24]
mov byte [ecx + eax + 9], dl
mov ecx, dword [esi + 0x24]
add ecx, eax
inc dword [ebp - 0xc]
add eax, 0xc
mov bl, byte [ecx + 0xb]
mov dl, byte [ecx + 0xa]
mov byte [ecx + 0xa], bl
mov ecx, dword [esi + 0x24]
mov byte [ecx + eax - 1], dl
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [edi]
jl 0x41412a
xor ebx, ebx
mov eax, dword [edi]
imul eax, eax, 0x34
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
cmp eax, ebx
pop ecx
mov dword [esi + 0x28], eax
je 0x413f35
fild dword [esi + 4]
fild dword [esi + 8]
and byte [esi + 0x30], 0
and byte [esi + 0x31], 0
cmp dword [edi], ebx
mov dword [ebp - 0xc], ebx
fld st(1)
fdivr qword [0x41c348]
fld st(1)
fdivr qword [0x41c348]
jle 0x41433c
xor eax, eax
mov dword [ebp - 0x14], ebx
mov ecx, dword [esi + 0x24]
add ecx, dword [ebp - 0x14]
mov dl, byte [ecx + 2]
cmp dl, byte [esi + 0x30]
jbe 0x4141d0
mov dl, byte [ebp - 1]
mov byte [esi + 0x30], dl
mov dl, byte [ecx + 3]
cmp dl, byte [esi + 0x31]
jbe 0x4141db
mov byte [esi + 0x31], dl
mov dx, word [ecx + 8]
mov bx, word [ecx + 0xa]
dec dx
sub bx, 2
movsx edx, dx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x20], ebx
fild dword [ebp - 0x1c]
mov bl, byte [ecx + 2]
mov edx, dword [esi + 0x28]
add bl, 2
fdiv st(4)
mov byte [ebp - 1], bl
mov bl, byte [ecx + 3]
add bl, 2
mov byte [ebp + 0xb], bl
mov bl, byte [ecx + 6]
inc bl
mov byte [ebp - 2], bl
fadd st(2)
fsub dword [0x41caf0]
fst dword [eax + edx]
movsx edx, word [ebp - 0x20]
mov dword [ebp - 0x20], edx
mov edx, dword [esi + 0x28]
fild dword [ebp - 0x20]
fdiv st(4)
fadd st(2)
fst dword [eax + edx + 4]
movsx dx, byte [ecx + 4]
mov ebx, dword [esi + 0x28]
mov word [eax + ebx + 8], dx
mov ebx, dword [esi + 0x28]
movsx dx, byte [ecx + 5]
mov word [eax + ebx + 0xa], dx
movzx edx, byte [ebp - 1]
add edx, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], edx
mov edx, dword [esi + 0x28]
fild dword [ebp - 0x1c]
fdiv st(6)
fadd st(4)
fsub dword [0x41caf0]
fst dword [ebp - 0x1c]
fstp dword [eax + edx + 0xc]
mov edx, dword [esi + 0x28]
fstp dword [eax + edx + 0x10]
movzx dx, byte [ebp - 1]
fld dword [ebp - 0x1c]
movsx bx, byte [ecx + 4]
mov word [ebp - 0x28], dx
add ebx, edx
mov edx, dword [esi + 0x28]
mov word [eax + edx + 0x14], bx
mov ebx, dword [esi + 0x28]
movsx dx, byte [ecx + 5]
mov word [eax + ebx + 0x16], dx
mov edx, dword [esi + 0x28]
fstp dword [eax + edx + 0x18]
movzx edx, byte [ebp + 0xb]
add edx, dword [ebp - 0x20]
mov dword [ebp - 0x20], edx
mov edx, dword [esi + 0x28]
fild dword [ebp - 0x20]
fdiv st(4)
fadd st(2)
fst dword [ebp - 0x20]
fstp dword [eax + edx + 0x1c]
movsx dx, byte [ecx + 4]
add edx, dword [ebp - 0x28]
mov ebx, dword [esi + 0x28]
mov word [eax + ebx + 0x20], dx
movzx dx, byte [ebp + 0xb]
movsx bx, byte [ecx + 5]
mov word [ebp - 0x2c], dx
add ebx, edx
mov edx, dword [esi + 0x28]
mov word [eax + edx + 0x22], bx
mov edx, dword [esi + 0x28]
fstp dword [eax + edx + 0x24]
mov edx, dword [esi + 0x28]
fld dword [ebp - 0x20]
add dword [ebp - 0x14], 0xc
fstp dword [eax + edx + 0x28]
movsx dx, byte [ecx + 4]
mov ebx, dword [esi + 0x28]
add eax, 0x34
mov word [eax + ebx - 8], dx
mov edx, dword [esi + 0x28]
movsx cx, byte [ecx + 5]
add ecx, dword [ebp - 0x2c]
inc dword [ebp - 0xc]
mov word [eax + edx - 6], cx
movsx ecx, byte [ebp - 2]
mov dword [ebp + 8], ecx
mov ecx, dword [esi + 0x28]
fild dword [ebp + 8]
fstp dword [eax + ecx - 4]
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [edi]
jl 0x4141bc
mov edx, dword [esi + 0x24]
mov ebx, dword [edi]
fstp st(0)
movzx ecx, word [edx]
fstp st(0)
fstp st(0)
cmp ebx, 1
mov eax, ecx
fstp st(0)
jle 0x414371
add edx, 0xc
dec ebx
mov dword [ebp + 8], ebx
movzx ebx, word [edx]
cmp ebx, ecx
jge 0x414363
mov ecx, ebx
cmp ebx, eax
jle 0x414369
mov eax, ebx
add edx, 0xc
dec dword [ebp + 8]
jne 0x41435a
sub eax, ecx
push 4
inc eax
mov dword [esi + 0x18], ecx
push eax
mov dword [esi + 0x1c], eax
call dword [sym.imp.MSVCRT.dll_calloc]
pop ecx
mov dword [esi + 0x2c], eax
pop ecx
xor ecx, ecx
cmp eax, ecx
je 0x413f35
cmp dword [edi], ecx
mov dword [ebp - 0xc], ecx
jle 0x4143c5
xor eax, eax
mov dword [ebp + 8], ecx
mov edx, dword [esi + 0x24]
mov ecx, dword [ebp + 8]
add ecx, dword [esi + 0x28]
mov ebx, dword [esi + 0x2c]
movzx edx, word [edx + eax]
sub edx, dword [esi + 0x18]
inc dword [ebp - 0xc]
add dword [ebp + 8], 0x34
add eax, 0xc
mov dword [ebx + edx*4], ecx
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [edi]
jl 0x41439e
mov eax, dword [ebp - 0x10]
mov dword [0x445214], 1
sub eax, 0
je 0x4143df
dec eax
je 0x414408
jmp 0x414550
mov eax, dword [sym.imp.MSVCRT.dll__iob]
mov edi, dword [sym.imp.MSVCRT.dll_fprintf]
add eax, 0x40
push str.TXF_FORMAT_BYTE_was_removed_because_n
push eax
call edi
mov eax, dword [sym.imp.MSVCRT.dll__iob]
push str.it_didnt_do_padding_properly._n
add eax, 0x40
push eax
call edi
add esp, 0x10
mov eax, dword [esi + 4]
mov ebx, dword [esi + 8]
mov dword [ebp + 8], eax
lea edi, [eax + 7]
sar edi, 3
mov dword [ebp - 0x1c], edi
imul edi, ebx
push edi
call dword [sym.imp.MSVCRT.dll_malloc]
test eax, eax
pop ecx
mov dword [ebp - 0xc], eax
je 0x413f35
push dword [ebp - 8]
push edi
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, edi
jne 0x413fd9
cmp dword [0x445214], 0
je 0x4144cc
mov eax, ebx
push 1
imul eax, dword [ebp + 8]
shl eax, 1
push eax
call dword [sym.imp.MSVCRT.dll_calloc]
pop ecx
mov dword [esi + 0x20], eax
test eax, eax
pop ecx
je 0x413f35
test ebx, ebx
jle 0x414546
xor edi, edi
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x14], edi
xor edx, edx
cmp dword [ebp + 8], edx
jle 0x4144bc
mov ecx, edx
push 1
and ecx, 7
pop eax
mov ebx, dword [ebp - 0xc]
shl eax, cl
mov ecx, edx
sar ecx, 3
add ecx, dword [ebp - 0x14]
mov cl, byte [ecx + ebx]
test cl, al
je 0x4144b6
mov ecx, dword [esi + 0x20]
lea eax, [edi + edx]
shl eax, 1
or byte [eax + ecx], 0xff
mov ecx, dword [esi + 0x20]
or byte [eax + ecx + 1], 0xff
inc edx
cmp edx, dword [ebp + 8]
jl 0x414486
mov eax, dword [ebp - 0x1c]
add edi, dword [ebp + 8]
add dword [ebp - 0x14], eax
dec dword [ebp - 0x20]
jne 0x41447f
jmp 0x414546
mov edi, dword [ebp + 8]
mov eax, ebx
imul eax, edi
push 1
push eax
mov dword [0x445218], edi
mov dword [0x44521c], ebx
call dword [sym.imp.MSVCRT.dll_calloc]
pop ecx
mov dword [esi + 0x20], eax
test eax, eax
pop ecx
je 0x413f35
test ebx, ebx
jle 0x414546
and dword [ebp - 0x14], 0
and dword [ebp + 8], 0
mov dword [ebp - 0x20], ebx
xor eax, eax
test edi, edi
jle 0x414538
mov ecx, eax
push 1
and ecx, 7
pop edx
mov ebx, dword [ebp - 0xc]
shl edx, cl
mov ecx, eax
sar ecx, 3
add ecx, dword [ebp + 8]
mov cl, byte [ecx + ebx]
test cl, dl
je 0x414533
mov ecx, dword [ebp - 0x14]
mov edx, dword [esi + 0x20]
add ecx, eax
or byte [ecx + edx], 0xff
inc eax
cmp eax, edi
jl 0x41450b
mov eax, dword [ebp - 0x1c]
add dword [ebp - 0x14], edi
add dword [ebp + 8], eax
dec dword [ebp - 0x20]
jne 0x414505
push dword [ebp - 0xc]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
push dword [ebp - 8]
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
mov eax, esi
jmp 0x4145ae
mov dword [0x445210], str.not_a_texture_font_file.
test esi, esi
je 0x4145a2
mov eax, dword [esi + 0x24]
mov edi, dword [sym.imp.MSVCRT.dll_free]
test eax, eax
je 0x41457d
push eax
call edi
pop ecx
mov eax, dword [esi + 0x28]
test eax, eax
je 0x414588
push eax
call edi
pop ecx
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x414593
push eax
call edi
pop ecx
mov eax, dword [esi + 0x20]
test eax, eax
je 0x41459e
push eax
call edi
pop ecx
push esi
call edi
pop ecx
push dword [ebp - 8]
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret