Function at 0x505400
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4f0
mov eax, dword [0x641a90]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x384]
push edi
mov edi, dword [ebp + 0xc]
push eax
push ebx
call fcn.005057b0
add esp, 8
test ax, ax
jne 0x505445
pop edi
mov eax, 2
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
cmp byte [ebp - 0x384], 0xa
jne 0x505430
mov al, byte [ebp - 0x383]
test al, al
je 0x505464
cmp al, 2
je 0x505464
cmp al, 3
je 0x505464
cmp al, 5
jne 0x505430
lea eax, [ebp - 0x4ec]
push esi
push eax
call fcn.00457d90
mov al, byte [0x5edfa4]
add esp, 4
movzx esi, word [ebp - 0x37c]
movzx edx, word [ebp - 0x37a]
mov ch, byte [ebp - 0x343]
mov cl, byte [ebp - 0x381]
movdqu xmm0, xmmword [str.Zsoft_Paintbrush]
mov byte [ebp - 0x3f6], al
movzx eax, word [ebp - 0x378]
mov dword [ebp - 0x4c8], eax
movzx eax, word [ebp - 0x376]
mov dword [ebp - 0x4c4], eax
movzx eax, word [ebp - 0x380]
sub esi, eax
mov dword [ebp - 0x4e4], 1
movzx eax, word [ebp - 0x37e]
inc esi
sub edx, eax
mov dword [ebp - 0x4dc], esi
movzx eax, ch
inc edx
mov word [ebp - 0x4d4], ax
movzx eax, cl
mov word [ebp - 0x4d2], ax
movzx eax, word [ebp - 0x342]
mov dword [ebp - 0x4d8], edx
mov dword [ebp - 0x4cc], eax
movdqu xmmword [ebp - 0x406], xmm0
cmp cl, 0xf
je 0x505522
mov dword [ebp - 0x4ec], 0
cmp cl, 0x10
jne 0x50552c
mov dword [ebp - 0x4ec], 0x80
cmp byte [ebp - 0x382], 0
mov eax, 1
je 0x505541
mov word [ebp - 0x4ac], ax
cmp esi, 1
jl 0x505765
cmp edx, 1
jl 0x505765
test ch, ch
je 0x505765
movzx edx, cl
movzx eax, ch
imul edx, eax
cmp edx, 3
je 0x505765
cmp edx, 5
jl 0x50557b
cmp edx, 8
jl 0x505765
cmp ch, 8
ja 0x505765
test cl, cl
je 0x505765
cmp cl, 0x18
ja 0x505765
cmp cl, 0x20
jae 0x505765
cmp cl, 8
jbe 0x5055ac
cmp cl, 0xf
jb 0x505765
cmp ch, 2
jne 0x5055b6
cmp cl, 8
jmp 0x5055be
cmp ch, 3
jb 0x5055c4
cmp cl, 4
je 0x505765
cmp byte [ebp - 0x383], 3
jne 0x5055fd
movdqu xmm0, xmmword [0x63addc]
movdqu xmmword [ebp - 0x374], xmm0
movdqu xmm0, xmmword [0x63adec]
movdqu xmmword [ebp - 0x364], xmm0
movdqu xmm0, xmmword [0x63adfc]
movdqu xmmword [ebp - 0x354], xmm0
lea eax, [ebp - 0x4ec]
push eax
push edi
call fcn.00456000
movzx eax, ax
add esp, 8
test ax, ax
jne 0x505796
cmp byte [ebp - 0x382], 0
lea eax, [ebp - 0x4ec]
push eax
push edi
push ebx
je 0x505632
call fcn.00505210
jmp 0x505637
call fcn.005053a0
movzx eax, ax
add esp, 0xc
xor ecx, ecx
mov dword [ebp - 0x4f0], eax
cmp byte [ebp - 0x383], 5
jne 0x5056f6
xor esi, esi
mov eax, esi
inc esi
cmp eax, 0x20
jge 0x505677
push dword [ebx]
call fcn.00597fff
movzx ecx, ax
add esp, 4
cmp cx, 0xffff
je 0x505677
cmp cx, 0xc
jne 0x505654
jmp 0x50567d
cmp cx, 0xc
jne 0x5056f6
movsx ecx, word [ebp - 0x4d2]
movsx eax, word [ebp - 0x4d4]
imul ecx, eax
cmp ecx, 8
jg 0x50573f
push dword [ebx]
mov eax, 1
shl eax, cl
push 1
lea eax, [eax + eax*2]
push eax
lea eax, [ebp - 0x304]
push eax
call fcn.00595b79
mov ecx, dword [ebp - 0x4f0]
test eax, eax
lea eax, [ebp - 0x304]
mov edx, 4
push eax
push 8
cmove ecx, edx
push 0x100
push edi
mov dword [ebp - 0x4f0], ecx
call fcn.00453f80
mov eax, dword [ebp - 0x4f0]
add esp, 0x20
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
movsx ecx, word [ebp - 0x4d2]
movsx eax, word [ebp - 0x4d4]
imul ecx, eax
cmp ecx, 2
jle 0x50573f
cmp ecx, 8
jge 0x50573f
lea eax, [ebp - 0x374]
push eax
push 8
push 0x100
push edi
call fcn.00453f80
mov eax, dword [ebp - 0x4f0]
add esp, 0x10
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push edi
call fcn.00453f80
mov eax, dword [ebp - 0x4f0]
add esp, 0x10
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
movdqu xmm0, xmmword [str.Pcx_:_Bad_pictures_size__]
movdqu xmmword [edi + 0x44], xmm0
movq xmm0, qword [0x5edfb8]
movq qword [edi + 0x54], xmm0
mov ax, word [0x5edfc0]
mov word [edi + 0x5c], ax
mov al, byte [0x5edfc2]
mov byte [edi + 0x5e], al
mov eax, 2
mov ecx, dword [ebp - 4]
pop esi
pop edi
xor ecx, ebp
pop ebx
call fcn.005920c1
mov esp, ebp
pop ebp
ret