Function at 0x402a10
Capabilities:
Get common file path
Get file size
Read file on windows

Disassembly:
pushal
push 0x408360
push 0x3ff
call sub.kernel32.dll_GetCurrentDirectoryA
push str.PIXEL.001
push 0x408360
call sub.kernel32.dll_lstrcatA
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push 0x408360
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
je 0x402bcd
mov ebx, eax
push 0x4052b8
push ebx
call sub.kernel32.dll_GetFileSize
mov dword [0x405304], eax
add eax, 0x400
xor al, al
mov dword [0x405308], eax
push 4
push 0x1000
push eax
push 0
call sub.kernel32.dll_VirtualAlloc
mov dword [0x405300], eax
mov dword [0x40531c], eax
mov esi, eax
push 0
push 0x4052bc
push dword [0x405304]
push esi
push ebx
call sub.kernel32.dll_ReadFile
mov eax, dword [0x4052bc]
push eax
push ebx
call sub.kernel32.dll_CloseHandle
pop eax
or eax, eax
je 0x402d7a
mov ecx, 0x4004
mov edi, esi
xor eax, eax
mov edx, 0x110
mov al, byte [esi]
sub edx, eax
lodsb al, byte [esi]
add al, dl
stosb byte es:[edi], al
dec ecx
jne 0x402ac8
mov al, byte [esi]
add al, dl
cmp al, 0x10
jne 0x402ae7
mov ecx, 0x1001
mov edi, esi
lodsb al, byte [esi]
add al, dl
stosb byte es:[edi], al
dec ecx
jne 0x402ade
jmp 0x402af9
push 0
push 0x4b5
push dword [0x4052d0]
call sub.user32.dll_DeleteMenu
push 4
push 0x1000
push 0x10000
push 0
call sub.kernel32.dll_VirtualAlloc
push eax
push eax
mov edi, eax
push esi
mov ecx, 0x12
mov esi, 0x405020
rep movsb byte es:[edi], byte [esi]
pop esi
mov dword [0x405334], esi
mov ecx, 0xfd00
xor eax, eax
mov edx, 0x100
mov al, byte [esi]
sub edx, eax
lodsb al, byte [esi]
add al, dl
stosb byte es:[edi], al
dec ecx
jne 0x402b34
call fcn.00403090
mov dword [0x4052e0], eax
pop eax
push 0x4000
push 0x10000
push eax
call sub.kernel32.dll_VirtualFree
mov eax, esi
sub eax, dword [0x405300]
mov ecx, dword [0x405304]
sub ecx, eax
mov dword [0x405324], ecx
mov dword [0x405320], esi
mov edi, esi
xor eax, eax
mov edx, 0x100
mov al, byte [esi]
sub edx, eax
lodsb al, byte [esi]
add al, dl
stosb byte es:[edi], al
dec ecx
jne 0x402b7f
mov edi, 0x405480
mov esi, dword [0x405320]
xor edx, edx
xor eax, eax
xor ecx, ecx
xor ebx, ebx
mov cl, byte [esi + 0x10]
mov ax, word [esi + 0xc]
mov dx, word [esi + 0xe]
mov bx, word [esi + 5]
imul ebx, ebx, 3
mul edx
add ebx, eax
add ebx, 0x12
mov ecx, dword [0x405324]
push esi
call fcn.00403090
stosd dword es:[edi], eax
add esi, ebx
sub ecx, ebx
cmp ecx, 0
jne 0x402bb8
jmp 0x402d7a
push 0x408360
push 0x3ff
call sub.kernel32.dll_GetCurrentDirectoryA
push str.PIXEL.FNT
push 0x408360
call sub.kernel32.dll_lstrcatA
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push 0x408360
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
je 0x402d7a
mov ebx, eax
push 0x4052b8
push ebx
call sub.kernel32.dll_GetFileSize
mov dword [0x405304], eax
mov eax, 0x657c00
mov dword [0x405308], eax
push 4
push 0x1000
push eax
push 0
call sub.kernel32.dll_VirtualAlloc
mov dword [0x405300], eax
mov dword [0x40531c], eax
mov esi, eax
push 0
push 0x4052bc
push dword [0x405304]
push eax
push ebx
call sub.kernel32.dll_ReadFile
mov eax, dword [0x4052bc]
push eax
push ebx
call sub.kernel32.dll_CloseHandle
pop eax
or eax, eax
je 0x402d7a
push 0x408360
push 0x3ff
call sub.kernel32.dll_GetCurrentDirectoryA
push str.MENI.TGA
push 0x408360
call sub.kernel32.dll_lstrcatA
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push 0x408360
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
je 0x402d7a
mov ebx, eax
push 0
push 0
push 0x12
push ebx
call sub.kernel32.dll_SetFilePointer
mov eax, esi
add eax, dword [0x405304]
push 0
push 0x4052bc
push 0xfd00
push eax
push ebx
call sub.kernel32.dll_ReadFile
mov eax, dword [0x4052bc]
push eax
push ebx
call sub.kernel32.dll_CloseHandle
pop eax
or eax, eax
je 0x402d7a
add dword [0x405304], 0xfd00
push 0x408360
push 0x3ff
call sub.kernel32.dll_GetCurrentDirectoryA
push str.PIXEL.TGA
push 0x408360
call sub.kernel32.dll_lstrcatA
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push 0x408360
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
je 0x402d7a
mov ebx, eax
push 0x4052b8
push ebx
call sub.kernel32.dll_GetFileSize
mov edx, esi
add edx, dword [0x405304]
add dword [0x405304], eax
push 0
push 0x4052bc
push eax
push edx
push ebx
call sub.kernel32.dll_ReadFile
mov eax, dword [0x4052bc]
push eax
push ebx
call sub.kernel32.dll_CloseHandle
pop eax
or eax, eax
je 0x402d7a
jmp 0x402ab6
push 0x408360
push 0x3ff
call sub.kernel32.dll_GetCurrentDirectoryA
push str.PIXEL.003
push 0x408360
call sub.kernel32.dll_lstrcatA
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push 0x408360
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
je 0x402e72
mov ebx, eax
push 0x4052b8
push ebx
call sub.kernel32.dll_GetFileSize
mov dword [0x405310], eax
add eax, 0x400
xor al, al
mov dword [0x405314], eax
push 4
push 0x1000
push eax
push 0
call sub.kernel32.dll_VirtualAlloc
mov dword [0x40530c], eax
mov esi, eax
push 0
push 0x4052bc
push dword [0x405314]
push esi
push ebx
call sub.kernel32.dll_ReadFile
mov eax, dword [0x4052bc]
push eax
push ebx
call sub.kernel32.dll_CloseHandle
pop eax
or eax, eax
je 0x402e72
mov edi, esi
mov ecx, dword [0x405310]
xor eax, eax
mov edx, 0x100
mov al, byte [esi]
sub edx, eax
lodsb al, byte [esi]
add al, dl
stosb byte es:[edi], al
dec ecx
jne 0x402e29
mov edi, 0x406420
mov esi, dword [0x40530c]
xor edx, edx
xor eax, eax
xor ecx, ecx
xor ebx, ebx
mov cl, byte [esi + 0x10]
mov ax, word [esi + 0xc]
mov dx, word [esi + 0xe]
mov bx, word [esi + 5]
imul ebx, ebx, 3
mul edx
add ebx, eax
add ebx, 0x12
mov ecx, dword [0x405310]
push esi
call fcn.00403090
stosd dword es:[edi], eax
add esi, ebx
sub ecx, ebx
cmp ecx, 0
jne 0x402e62
push 0x408360
push 0x3ff
call sub.kernel32.dll_GetCurrentDirectoryA
push str.PIXEL.002
push 0x408360
call sub.kernel32.dll_lstrcatA
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push 0x408360
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
je 0x403048
mov ebx, eax
push 0x4052b8
push ebx
call sub.kernel32.dll_GetFileSize
mov dword [0x4052f8], eax
add eax, 0x400
xor al, al
mov dword [0x4052fc], eax
push 4
push 0x1000
push eax
push 0
call sub.kernel32.dll_VirtualAlloc
mov dword [0x4052f4], eax
mov esi, eax
push 0
push 0x4052bc
push dword [0x4052f8]
push esi
push ebx
call sub.kernel32.dll_ReadFile
mov eax, dword [0x4052bc]
push eax
push ebx
call sub.kernel32.dll_CloseHandle
pop eax
or eax, eax
je 0x40308c
xor ecx, ecx
mov edi, 0x405040
mov al, byte [esi]
cmp al, byte [edi]
je 0x402f23
inc ecx
inc edi
jmp 0x402f1b
mov dl, byte [ecx + 0x405050]
add al, dl
mov ah, byte [ecx + str._r_r_r_r_r]
cmp al, ah
je 0x402f4c
push 0
push str.ERROR_
push str.Failed_decoding_tekst.
push dword [0x4052a4]
call sub.user32.dll_MessageBoxA
mov dword [0x4052dc], ecx
mov ecx, dword [0x4052f8]
mov edi, esi
lodsb al, byte [esi]
add al, dl
stosb byte es:[edi], al
dec ecx
jne 0x402f5a
push 4
push 0x1000
push 0x4000
push 0
call sub.kernel32.dll_VirtualAlloc
mov dword [0x40532c], eax
mov esi, dword [0x40532c]
mov dword [esi], 0xffffffff
add esi, 0x30
mov dword [esi], 0xffffffff
add esi, 0x10
push 0x405238
push esi
call sub.kernel32.dll_lstrcpyA
mov edi, dword [0x4052f4]
mov ecx, dword [0x4052f8]
add esi, 0x20
mov al, 0xfb
repne scasb al, byte es:[edi]
or ecx, ecx
je 0x402fdd
push edi
push esi
xchg esi, edi
add edi, 0x10
lodsb al, byte [esi]
cmp al, 0xd
je 0x402fc2
stosb byte es:[edi], al
jmp 0x402fba
inc esi
mov ebx, esi
pop esi
mov dword [esi], ebx
pop edi
mov al, 0xfb
repne scasb al, byte es:[edi]
or ecx, ecx
je 0x402fdd
sub ebx, edi
not ebx
mov dword [esi + 4], ebx
add esi, 0x30
jmp 0x402fb3
mov dword [esi], 0xffffffff
add esi, 0x10
push str._______________________
push esi
call sub.kernel32.dll_lstrcpyA
add esi, 0x20
mov dword [esi], 0xffffffff
add esi, 0x30
mov dword [0x405330], esi
mov esi, dword [0x40532c]
add esi, 0x60
mov dword [0x405340], esi
mov dword [0x4052d8], 0x2ee0
cmp dword [esi], 0xffffffff
je 0x403046
add esi, 0x10
push edi
push dword [0x4052d8]
push 0x100
push dword [0x4052d4]
call sub.user32.dll_AppendMenuA
inc dword [0x4052d8]
add esi, 0x20
jmp 0x40301c
jmp 0x40308c
push 0x408360
push 0x3ff
call sub.kernel32.dll_GetCurrentDirectoryA
push str.PIXEL.TXT
push 0x408360
call sub.kernel32.dll_lstrcatA
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push 0x408360
call sub.kernel32.dll_CreateFileA
cmp eax, 0xffffffff
je 0x40308c
jmp 0x402eb5
popal
ret